• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
blacksmith
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think, you should be use DataSource instead JDBC ..

Datasource is flexible/useful more than JDBC...
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Somkiat,

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

Cheers,

Gian Franco Casula
 
Gian Franco
blacksmith
Posts: 979
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
author
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pascal summarized it nicely
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To clarify, javax.sql.Datasource is part of JDBC :-)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic