• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate vs Legacy DataBases

 
visu nallamaru
Greenhorn
Posts: 16
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we prefer Hibernate to ease the data base transactions when maintaining/working with legacy databases ?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure I understand your question. Prefer Hibernate to what?
 
visu nallamaru
Greenhorn
Posts: 16
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we introduce ORM (hibernate ) layer when working with Legacy Database which is directly accessed by JDBC ? what are the complications to look for ?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes we can. Hibernate uses JDBC, so as far as the low level connection stuff is concerned there is no difference.The complications depend on the database. By "legacy" I infer poorly modelled. Hibernate is fairly strict when it comes to relational databases that are not actually relational (e.g. entities without primary keys) so there may need to be some compromises made. But Hibernate always allows you to run native SQL, so anything you can currently do on your legacy database in SQL you can carry on doing if you have to.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!