Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Is it necessary to use Hibernate in this case?

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application which displays the monthly assignment schedule of every employee. Each employee is assigned a task each day and let's say I have 175 employees......so...in a month....there would be (30x175) = 5250 employee-task assignment information. That would mean retrieving 5250 records from the DB if I wanted to view the employee assignment monthly schedule....and let's say there are other more complicated information involved here along with the sorting of data.

So in this particular case? Is it necessary to use Hibernate to minimize complexity in coding especially in the queries? or should I stick with using JDBC? What are the main pros and cons of each?
[ October 04, 2005: Message edited by: aj delr ]
 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would definetly use Hibernate. The pros I see is that structre is really easy to map to an hbm file and let H deal with the SQL writing. You can also use LAZY http://www.hibernate.org/280.html to save on the resources by not initializing all the objects. Plus in the future you will probably expand or modify the data structure. With H you basically just edit the hbm. With JDBC you have to go SQL hunting.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it depends on how much you use Hibernate before. In my opinion, Hibernate will be useful in design phase. But if you are a newbie in Hibernate , 5000 entities also can be handled without Hibernate too.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hibernate will be useful in design phase


Hibernate is an impementation, not a design tool. I don't know if it really brings anything to the design phase. If you design your software using OO concepts you are basically writing in the requirement to have an ORM layer somewhere - either writing it yourself or using some third party tool such as Hibernate. And its presence should not (in my opinion) influence any ER modelling decisions, despite Hibernate's docs suggesting you can design data models from the Object model down.

(BTW: this wasn't the question asked but you mention it in your reply: 5000 entities would probably strongly suggest some sort of mapping layer, since an entity = one table not one record. So you would be looking at a fairly big ER model)
[ October 07, 2005: Message edited by: Paul Sturrock ]
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic