Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between JDBC and Hibernate?
Give one sample based on the variance?

Answer Posted / mukundan

Hibernate is one level above JDBC in the sense that Hiberate
internally uses JDBC. Hence a direct comparison may not be
effecient. Still...

Hibernate is Object based mapping (ORM). JDBC concerns more
of RDB meta data mapped to the members of the java objects
i.e. POJO.

Data sent and results returned from RDB loaded back into
Domain (POJO) objects are taken care internally by
Hibernate. In JDBC loading the returned data from RDB into
java objects to be done externally, by developer.

Hibernate caches data at Level 1 and supports optional Level
2 caching through third party software (ehcache,
TreeCache/JBoss cache etc.) Caching is totally external to
JDBC.

Hibernate supports HQL which is again more Java Object
based. JDBC supports only SQL and relating and loading Java
objects should be done externally by developer.

Hibernate supports lazy loading of objects which JDBC
doesn't support.

RDB Table dependency and integrity in Hibernate is supported
through Object relationships. It is external to JDBC.

Through Object relationship (defined in XML) the entire RDB
DDL could be generated. This is out of scope in JDBC.

Is This Answer Correct ?    25 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How java can be connected to a database?

1096


What is transaction processing in jdbc?

1007


What is jdbc odbc connection?

977


How do I start debugging problems related to the JDBC API?

1022


What are the differences between resultset and rowset?

1125


What is execute in java?

971


Jdbc-odbc bridge is multi-threaded or not?

959


What are different types of JDBC Drivers?

1160


Why is jdbc used?

940


What is JDBC DataSource and what are it’s benefits?

1208


What are four types of JDBC driver?

1138


Which type of driver provides jdbc access via one or more odbc drivers?

901


What is jdbc class forname?

963


What is jdbc url for mysql?

1030


What happens if connection is not closed in jdbc?

975