GeeCON Prague 2014*
The moose likes Object Relational Mapping and the fly likes Hibernate vs other ORMs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate vs other ORMs" Watch "Hibernate vs other ORMs" New topic
Author

Hibernate vs other ORMs

Paul Croarkin
Ranch Hand

Joined: Sep 30, 2004
Posts: 106
Can the authors give a quick comparison of Hibernate vs some of the other light weight ORMs like iBatis?


Thanks,<br /> <br />Paul Croarkin<br />SCEA 5, SCWCD, SCJP
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

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

Joined: May 23, 2003
Posts: 1304
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


BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
Patrick Peak
Greenhorn

Joined: Aug 23, 2005
Posts: 19
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.


Hibernate Quickly - <a href="http://www.manning.com/books/peak" target="_blank" rel="nofollow">http://www.manning.com/books/peak</a>
Billy Tsai
Ranch Hand

Joined: May 23, 2003
Posts: 1304
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.
 
GeeCON Prague 2014
 
subject: Hibernate vs other ORMs