• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Hibernate Vs JDBC

Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have Orcale 9i database. Can i replace Hibernate instead of jdbc? How it affects the performance of the System?
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate will work fine with Oracle 9i (that's what my company uses).

Since Hibernate uses JDBC, with enough time, work, and craftiness you should be able to hand-code JDBC to be faster than Hibernate. The trick, however, is that with a sufficiently complex application, the risks of making a mistake with JDBC are greater than with a tool like Hibernate, JDO, TopLink, etc.

If your business logic modifies more than one object or different fields of the same object in different methods, optimizing JDBC becomes quite difficult and error prone. Hibernate helps out here by persisting object changes as a single unit, allowing some optimization (e.g. convert two updates to a user into a single SQL update).

I suggest reading some of the past messages in this forum to get a feel for the differences and whether or not Hibernate or a similar tool will be right for your application. There is no single answer.
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by David Harkness:
There is no single answer.

The fact that there's no "perfect" data persistence technology that can be recommended for all types of application means you need to be careful (and maybe flexible).

You may find "Choosing a data persistence strategy useful"


Also, a comparison of the various technologies


Finally, you need to separate out your choice of technologies (JDBC, Hibernate, EJB CMP, etc) from best design practices (such as using Data Access Objects).
What's gotten into you? Could it be this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic