Hibernate Interview Questions
Hibernate Interview Questions
1 / 13
Introduction
2 / 13
What is Hibernate ?
3 / 13
What is HQL?
4 / 13
Explain the advantages of Hibernate?
5 / 13
Why is ORM preferred over JDBC?
It allows business code access the objects rather than Database tables.
It hides the details of SQL queries from OO logic.
It is based on JDBC “under hood”.
Dealing with database implementation is not required.
Entities are based on business concepts rather than database structures.
It generates the automatic key and Transaction management.
Application development is faster.
6 / 13
Mention the Key components of Hibernate?
7 / 13
Explain the Session in Hibernate?
8 / 13
Explain the Transaction object in Hibernate?
It represents a unit of work with the database and most of the RDBMS
(Relational Database Management System) supports transaction
functionality.
In Hibernate, transactions are managed by an underlying transaction
manager and transaction from JDBC or JTA.
It is an optional object and the Hibernate Application do not use this
interface, instead, they handle the transactions in their code.
9 / 13
Explain the Query object in Hibernate?
These objects use SQL and HQL string to retrieve data from the database
and create objects.
An instance of Query is used to bind query parameters, restrict the number
of results returned by the query and finally to execute the query.
10 / 13
What is Hibernate caching?
Hibernate caches Query data and makes the application run faster.
If used correctly, the hibernate cache can be very useful in achieving the
faster application running performance.
The main idea lying behind the cache is reducing the number of database
queries, which results in reduced throughput time of the application.
11 / 13
What is Query level cache in Hibernate?
12 / 13
Thanks.
Reading Hibernate Interview Questions and Answer
Read More Interview Question below link:
https://www.onlineinterviewquestions.com
13 / 13