• Post Reply Bookmark Topic Watch Topic
  • New Topic

why is hibernate not used in each and every App which stores and retrieved data from DB?

 
Monica Shiralkar
Ranch Hand
Posts: 874
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We see a lot of web applications which stores and retrieves data in a database.Only in few of these we see hibernate being used.Should hibernate be used in each and every application that stores and retrieves data in a database or there are some situations where use of hibernate should be avoided.?
thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's an odd question. Hibernate is popular, but it is only one of multiple solutions. Others include using a different ORM API, using no ORM, and using a No-SQL DB. Why do you think Hibernate should be used in all web apps?
 
Monica Shiralkar
Ranch Hand
Posts: 874
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.

By using different ORM API, using no ORM, and using a No-SQL DB can we achieve what we can do using hibernate like below:

save(stateObj) and cities are also saved

or

retrieve cities using one to many / many to one mapping of state and city.

 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those are implementation questions - if any particular DB or DB API doesn't support it those directly you can always implement those on top of the DB API. But let's take a step a back: what prompted the original question? Are you trying to select a DB API for a web app project? Or a DB?
 
Monica Shiralkar
Ranch Hand
Posts: 874
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am trying to make a sample application for practice which has Spring so thought of using hibernate to store the values in database and retrieve it. Thats how I got this question that should I use hibernate.I want to practice hibernate
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you already decided to use Hibernate, then this question is moot as far as this project is concerned, isn't it?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!