Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q 4 C. Bauer & G. King (1): how Hibernate relates to JDBC

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear authors,

I'm new to Hibernate, but in a short
while in new projects I will come in
touch with it.

Having seen something of JDBC, how does
Hibernate relate to JDBC?

Cheers,

Gian Franco Casula
[ August 31, 2004: Message edited by: Gian Franco Casula ]
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hibernate uses JDBC to comunicate with the DB.
when working with hibernate you do not care about JDBC, SQL, Connections and so on. Hibernate is a layer above all this and simplifies your life when storing/retrieving Objects from/to DB. For special cases you can still use a JDBC DB Connection to do some work on DB but the ideal case would be that - other than providing a Connection at startup time - you do not get in touch with JDBC.

cheers

pascal
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think, you should be use DataSource instead JDBC ..

Datasource is flexible/useful more than JDBC...
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gian Franco Casula:
Having seen something of JDBC, how does
Hibernate relate to JDBC?


Gian, I did bookmark in the past about the JDBC where I found interesting on TheServerSide.com, when I am following about the Hibernate 3....

Here is the Link to that article...

Hope that would be helpful for you...
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Somkiat,

Pardon my ignorance , but what do you mean
by Datasource?

Cheers,

Gian Franco Casula
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ko Ko Naing:


Here is the Link to that article...

Hope that would be helpful for you...


Thanks Ko Ko,

Gian Franco Casula
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgot to say that the article that I provided above was written by one of the authors, who is Gavin King... I'm wondering if the "Hibernate in Action" book contains some parts from that article as well...

Anyway, I believe that article would give you a lot of info that you want to know...
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gian Franco Casula:
Hi Somkiat,

Pardon my ignorance , but what do you mean
by Datasource?

Cheers,

Gian Franco Casula




More detail about datasource ::

http://jakarta.apache.org/commons/dbcp/
 
Christian Bauer
author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pascal summarized it nicely
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Commons DBCP is a specific (and popular) connection pool implementation that uses the DataSource interface. DataSource itself is part of the Java 2 core platform; for more information, see the javadoc and the JDBC API Tutorial and Reference, 3rd ed., by Fisher et al.

- Peter

PS. disclosure: I was one of the tech reviewers for this book.
[ August 31, 2004: Message edited by: Peter den Haan ]
 
Gavin King
author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To clarify, javax.sql.Datasource is part of JDBC :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic