10:13 pm - Friday March 22, 2019

Hibernate Introduction

Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

Hibernate was introduced by Gavin king in 2001.

Hibernate is used to simplify work in data base.

Hibernate is an Library in Java, used for an Object Relational Mapping (ORM).

Hibernate mainly used for mapping tables in data base and simplify relation between data bases.

It’s an open source.


It supports 12 data bases.

It generates queries automatically according to data base driver what we used.

Eh cache:

2nd level cache – It retrieve data’s from data base and store it in some temporary file and process queries from that file instead of data base.

It saves time because of small data’s in temporary files.

Hibernate can be integrated in java and j2EE (Servlet,Struts).


xml file is an intermediate for java and data base.

Mapping java class and database is process through xml.

Xml file map the java class variables (java data types) to data base table attributes (sql data types).

Persistence (POJO):

Persistence – storage.

Hibernate provides temporary storage for pojo class.

Plain Old Java Object – This is the persistence class in hibernate.

This class contains getter, setter method for attributes used in data base tables.

It should contain a no-argument constructor.

The variables used in this class are map with the attributes used in table through xml.


HQL is an object oriented language and also platform independent.

Instead of sql queries we use HQL in hibernate, it is easy to understand than sql queries.

Hibernate Query Language.


Create Query

Create Criteria

Sql Query


Filed in: Z-A Hibernate codes

No comments yet.

Leave a Reply