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

Which type of JDBC driver is the fastest one?

1045


Is jdbc a middleware?

902


Name the method, which is used to prepare a callablestatement.

879


Why do I have to reaccess the database for Array, Blob, and Clob data?

1017


How can we retrieve data from the resultset?

931


What are the different types of JDBC drivers?

1020


How can you make the connection using jdbc?

998


Is it possible to connect to multiple databases? Using single statement can we update or extract data from two or three or many databases?

1040


How do I set properties for a JDBC driver and where are the properties stored?

921


What is ojvm used for?

944


Which type of driver is unique in jdbc?

942


Describe the steps needed to execute a sql query using jdbc.

932


What are 4 drivers available in JDBC? At what situation are four of the drivers used?

913


How java can be connected to a database?

1053


Which interface handles transaction management in jdbc?

1067