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

What is a connection string used for?

911


What is jdbc architecture in java?

876


Why should we close database connections in java?

1090


What are the differences between stored procedure and functions?

957


What are different types of ResultSet?

989


What are the differences between statement and preparedstatement interface?

926


How we store procedure in oralce for callable statements in jdbc

2271


How do I insert/update records with some of the columns having NULL value?

885


What are the jdbc statements?

936


What are the different types of resultset?

895


I have the choice of manipulating database data using a byte[] or a java.sql.blob. Which has best performance?

866


What does jdbc setmaxrows method do?

903


How to check jdbc driver version in websphere?

1011


What is in term of jdbc a datasource?

865


How to insert and delete a row programmatically? (new feature in JDBC 2.0)

938