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

Answers were Sorted based on User's Feedback



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

Answer / mkj

1. hibernate is ORM wich maps POJO using xml
file to access and create data form hatro database.
but in jdbc developers has to write code to map
object model data to rdbms and it access.

2. jdbc using SQL to access database developer has to
effective way to access the database.but hibernate
provides HQL wich powerful and includes all feature
of SQL and supports ploymorphic query.
3. Hibernate data transaction is fast due to work is
perform due container mean its xml file mostly but
JDBC has slow transaction.

Is This Answer Correct ?    45 Yes 10 No

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

Answer / 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

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

Answer / kalyan

JDBC stands for Java Database Connectivity allows
developers to connect, query and update a database using
the Structured Query Language. JDBC API standard provides
Java developers to interact with different RDBMS and access
table data through Java application without learning RDBMS
details and using Database Specific JDBC Drivers.

Hibernate is an Object-Relational Mapping (ORM) solution
for JAVA. It is a powerful, high performance
object/relational persistence and query service. It allows
us to develop persistent classes following object-oriented
idiom – including association, inheritance and polymorphism.

Is This Answer Correct ?    6 Yes 1 No

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

Answer / sugunakarareddy

Hibernate is object relational mapping. which maps the pojos
using xml fiels. to access and create data from hetro
database. in jdbc we will a code for mapping to object model
data to relational database. access data.

jdbc support to sql only but in hibernate have hql is there.
all sql features are support to hql. but hql support
polymohisam query.

hibernate transaction performance is very fast compare jdbc
transcation.

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More JDBC Interview Questions

How many locking systems are there in jdbc?

0 Answers  


Explain about the Try Block?

0 Answers  


Explain different types of locks in jdbc?

0 Answers  


Can we make a database connection from HTML ?

6 Answers   Aptech, BOB Technologies, Cap Gemini, Wipro,


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

0 Answers  


What is represented by the connection object?

0 Answers  


What is the use of jdbc api?

0 Answers  


Can the JDBC-ODBC Bridge be used with applets?

2 Answers  


Can you define a foreign key, with a key from the same table?

2 Answers   IBM,


What is url in jdbc connection?

0 Answers  


What is the fastest type of JDBC driver?

0 Answers  


What is correlated subquery?

0 Answers   emc2, JK Technosoft,


Categories