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

What is jsp and jdbc?

0 Answers  


What is new in JDBC 2.0?

0 Answers  


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

0 Answers  


What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?

0 Answers  


What does the jdbc resultset interface?

0 Answers  






Hi friends, In JDBC 4 drivers are there among this which driver is best and why it is best.Which driver is most commonly used in web applications.

6 Answers  


Are there any ODBC drivers that do not work with the JDBC- ODBC Bridge?

2 Answers  


How can you tune SQL statements?

2 Answers   Wipro,


What does executeupdate return in jdbc?

0 Answers  


What are the components of jdbc?

0 Answers  


How can I write to the log used by DriverManager and JDBC drivers?

0 Answers  


What are the new features added to JDBC 4.0?

0 Answers  


Categories