How to decide which persistence technology to use? JDBC / CMP Entity Beans / Hibernate / JDO ?

Almost every web application today talks to a database and so at the start of each project, one question is surely going to come up. Which persistence technology to use?

I tried to google my way to the answer however either my google skills
are limited or the answer / a fair  comparison of the available
technologies isn’t out there.

So I thought of making this blog
interactive. You post comments to this blog and state what you think is
for or against a particular technology. I will later compile all
suggestions into a tabular form. Keep your comments short so that they
can easily be placed in a tabular format.

Lets restrict the scope of the comparison to:

  1. JDBC
  2. Hibernate
  3. CMP Entity Beans
  4. JDO

Java persistence technologies. A comparison.between JDBC, Hibernate, CMP Beans and JDO


  JDBC Hibernate CMP Beans JDO
Plus
1 Everyone knows it Easy to learn Ease of use Vendor portable
2 Suited for small systems Good performance IDE support Many vendors
3 Performance JSR-220 (EJB3) persistence Resume booster Adopted by Apache
4 Stored procedure usage Middlegen code generation Middlegen code generation Geronimo Integration
5

Batch updates/inserts

    JDO vendors will support EJB 3 as well
6       Middlegen code generation
7       great help from vendors
Minus
1   Not backed by specification Heavy and complex Low acceptance
2   Have to learn on your own. Not enough help on forums Steep learning curve

Risky long term choice

3       Few credible vendors
4        
5        
Other comments and suggestions
1 Prevayler (not listed) – Best if you are making a very small system (in terms of data size) that WILL NOT grow significantly and you dont’ need a RDBMS. Very easy to learn. Pure OO. Fast development. Excellent performance.
2

What about IBatis?

3 Forget the specs go with the best tool for the job. And there are way more tools then just hibernate.
4 I can’t say use this or that. Each has it’s advantages. Choose one and stick with it.
5 In the Torpedo benchmark, the top 2 performers are JDO implementations, beating out TOPLink, Weblogic CMP, and Hibernate.
6 Torpedo is a very useless benchmark.
 
The following two tabs change content below.
Content Team

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!
Content Team

Content Team

The IndicThreads Content Team posts news about the latest and greatest in software development as well as content from IndicThreads' conferences and events. Track us social media @IndicThreads. Stay tuned!

  • All web applications are based on database and I read comparison f all databases and I think they all are superb.

  • ‘Rathish’

    Hi there, Can anybody help me to deploy a CMP (EJB3) in JBoss 4.0.5 ? When I try with JDK1.5.0 and JDK1.6, I get the above error message in JBoss.

  • ‘Guest’

    i will shamelessly advocate for hibernate any day of the week. there is plenty of help on the hibernate forums. the hibernate documentation is some of the best available for an open source project. if you can’t do 95% of what hibernate is designed to do within a week of downloading it, you need to castrate yourself…and be quick about it.

  • Arvind

    Can anyone suggest the technology which works well for two phase commit ? I am not worried about other features.

  • Peter the ‘Guest’

    Hi,

    Somebody please tell me, how I can use mssql stored procedures with hibernate.

    Thanks in advance,
    Peter

  • Ashok

    how can i do code for batch processing using hibernate framework in java

  • Noname

    First of all, forget Hibernate for anything but a web-based servlet. It’s whole architecture is built around a web-based request/response cycle.

    Try posting a bug on Hibernate’s JIRA system. Even one that has a reproducible test case with a fix patch included. If Gavin likes it/is in a good mood, he’ll address it. If your use case is not interesting to him, then it will be rejected without comment.

    Try asking a question on the Hibernate user forum. If it’s an easy/newbie question, you’ll get lots of good help from the other users and a condescending RTFM from the development team. If it’s an intermediate question, you’ll get some wrong answers from other users, but you might get a good reply from the development team. If it’s a tough question or addresses an area that Hibernate is weak in, then it will either sit there unanswered, or you might get an answer from the development team like ‘don’t do it that way, you don’t know anything about databases.’

  • Noname

    I disagree that there isn’t enough help in the Hibernate forums. My experience has been the opposite. In fact, most of the responses that I’ve received were from the developers themselves.

  • Guest

    😕

  • Guest

    Iam a student of JAVA/J2EE and want to enter the java industry. By visiting some websites i read that .NET technology is coming up than java/j2EE and snatching away all the jobs.Also presently there are only maintainence jobs for java and no development .

    How far it’s true KINDLY CLARIFY

  • Guest

    The cost of not using standard tool usually is not felt until the project is done.
    I used DOA for two years, not because it was excellent — it has many bugs and error messages were misleading and not helpful at all — it was the only viable light-weight solution for Delphi then. Just imaginethose quirks the poor programmer had to learn after I left.

  • Guest

    The freedom of speech and expression that Indians enjoy also has some drawbacks.
    The media has become too powerful and arrogant. Many news channels and newspapers now have started creating stories and do what they want with total disregard for law and conventions.

  • harshad

    Updated the table. I have also added a new section where I have added snippets from the various comments that can help decide which persistence technology to use.

    To add comments using your name instead of the Guest id, all you need to do is register at IndicThreads.com. You can use this link http://indicthreads.com/user_extended/task,register/

  • Guest

    Back in the day when I was doing Delphi development I used a library DOA (Direct Oracle Access) http://www.allroundautomations.nl/doa.html which is an excellent tool ! It was not build to support any particular specs, but it was excellent all around… My point is: forget the specs go with the best tool for the job. And there are way more tools then just hibernate!