This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Q 4 C. Bauer & G. King (1): how Hibernate relates to JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Q 4 C. Bauer & G. King (1): how Hibernate relates to JDBC" Watch "Q 4 C. Bauer & G. King (1): how Hibernate relates to JDBC" New topic
Author

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

Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
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 ]

"Eppur si muove!"
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
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

Joined: Jul 04, 2003
Posts: 1312
I think, you should be use DataSource instead JDBC ..

Datasource is flexible/useful more than JDBC...


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi Somkiat,

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

Cheers,

Gian Franco Casula
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
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

Joined: Jun 08, 2002
Posts: 3178
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

Joined: Jul 04, 2003
Posts: 1312
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

Joined: Aug 31, 2004
Posts: 45
Pascal summarized it nicely


Co-Author of <a href="http://www.manning.com/bauer" target="_blank" rel="nofollow">Hibernate in Action</a>
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
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

Joined: Aug 31, 2004
Posts: 76
To clarify, javax.sql.Datasource is part of JDBC :-)


Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/193239415X/ref=jranch-20" target="_blank" rel="nofollow">Hibernate in Action</a>
 
 
subject: Q 4 C. Bauer & G. King (1): how Hibernate relates to JDBC
 
Similar Threads
Q 4 C. Bauer & G. King (10): database exceptions
Q 4 C. Bauer & G. King (6): "association fetching" and fetching strategy
Q about CVS: deleting
Java 2, v 5.0 Changes Everything!
CVSNT and Eclipse