• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate vs other ORMs

 
Paul Croarkin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can the authors give a quick comparison of Hibernate vs some of the other light weight ORMs like iBatis?
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate is more for if you want to do full object relationnal mapping. It abstracts you away from the database so that you don't have to write SQL statements (although you still should be aware of how the database works and what SQL is being issued to it).

iBatis, on the other hand, allows you to write specific SQL that runs for each database operation. It does not remove you from having to write SQL, however it does remove a lot of the difficult elements of JDBC.
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Hibernate is the best, I am currently using Intershop Enfinity suite 6 which provides a powerful platform for developing additional applications for unified commerce systems that are precisely tailored to the specific needs of a particular business model. Intershop has its own ORM framework which only supports Oracle database and Persistence Objects(VO) are mapped to single tables or database views. Other possibilities like mapping classes to join tables or other structures are not used within Enfinity Suite.
Therefor I believe Hibernate it very good in comparisom to other ORM frameworks
 
Patrick Peak
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are actually two questions there I think.
1) How does Hibernate compare to other Object Relational Mapping tools.
2) How does Hiberante compare to other JDBC wrapper tools, like iBatis/Spring/Commons DB.

My personal experience with other ORM tools is limited to Jakarta's ObjectRelationBridge, which I used before Hibernate. At the time (several years ago), we had a lot of problems with it due to lack of documentation and trouble tuning it to be really performant.

We starting using Hibernate and really haven't looked back, so I'm not really sure how OJB evolved. Hibernate is probably the most popular opensource ORM and while popularity isn't always a great indicator of technical elegance (i.e. Struts), I think its well deserved in Hibernate's case.

As far as JDBC wrappers like iBatis, I think they can do much of the same jobs as an true ORM. I've heard good things about iBatis, but haven't had the oppurtunity to use it on a project yet. If you don't have a complicated Object model, or you have a lot of SQL tuning experience/legacy SQL code, a tool like iBatis could probably useful.
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so basically Intershop's ORM framework only supports Table per class hierarchy where as Hibernate can also support table per subclass and table per concrete class. However we can design persistence object models as Class diagrams in Rational Rose and there is a Intershop plugin which can generate the corresponding Java and XML files from the class diagram.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic