• 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • 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"

http://www.codefutures.com/weblog/andygrove/archives/2005/01/choosing_a_java.html


Also, a comparison of the various technologies

http://www.codefutures.com/weblog/corporate/archives/2005/02/data_persistenc.html

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!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic