Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why I would use JDBC over Hibernate ?

 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron Wallace McKenzie,

Congrats for the book and Best of Luck !

My question is What are the situations where I would be forced to use JDBC over Hibernate ?

Thanks.
[ June 03, 2008: Message edited by: Ulf Dittmer ]
 
Reehan Lalkhanwar
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One could use raw SQL queries when you need to call functions/stored procedures on the DB.
For example:


In such situation you can still create a SQLQuery in Hibernate.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think Hibernate has problems dealing with stored procedures.

One area where JDBC is preferable is the batch import of large amounts of data. Using Hibernate (or ORM in general) doesn't add anything to that, but may cause a noticeable slowdown.
 
Eric Weinberg
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On one project, i had to use JDBC for some queries that joined on multiple databases.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic