• 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: 42970
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!