Professional Documents
Culture Documents
Page 1 of 5
Contribute Us | login
Home
Core Java
Servlet
+91-9990449935
JavaTpoint
Subscribe Us
0120-4256464
JSP
Struts2
Mail API
Hibernate
Spring
Android
Design Pattern
Quiz
Projects
Interview Q
Comment
Forum
Basics of Hibernate
HB Introduction
Hibernate LOG4J
HB Architecture
Hibernate Spring
Understanding First HB
application
Hibernate EJB
Hibernate Struts
Hibernate Mapping
Java Applications
Hibernate Object
Hibernate Tutorial
next>>
HB Dialects
Hibernate Logging
HB with Log4j 1
HB with Log4j 2
Hibernate Framework
Hibernate framework simplifies the development of java application to interact with
the database. Hibernate is an open source, lightweight, ORM (Object Relational Mapping) tool.
Inheritance Mapping
Table Per Hierarchy
TPH using Annotation
An ORM tool simplifies the data creation, data manipulation and data access. It is a programming technique
that maps the object to the data stored in the database.
The ORM tool internally uses the JDBC API to interact with the database.
One-to-many by Bag
Mapping Set
One-to-many by Set
Mapping Map
Many-to-many by Map
Bidirectional
Lazy Collection
Component Mapping
Association Mapping
One-to-one 1
One-to-one 2
Tx Management
HQL
HCQL
Named Query
Hibernate Caching
Second Level Cache
Integration
1) Opensource and Lightweight: Hibernate framework is opensource under the LGPL license and
lightweight.
2) Fast performance: The performance of hibernate framework is fast because cache is internally used in
hibernate framework. There are two types of cache in hibernate framework first level cache and second level
cache. First level cache is enabled bydefault.
3) Database Independent query: HQL (Hibernate Query Language) is the object-oriented version of SQL.
It generates the database independent queries. So you don't need to write database specific queries. Before
Hibernate, If database is changed for the project, we need to change the SQL query as well that leads to the
maintenance problem.
4) Automatic table creation: Hibernate framework provides the facility to create the tables of the database
automatically. So there is no need to create tables in the database manually.
5) Simplifies complex join: To fetch data form multiple tables is easy in hibernate framework.
6) Provides query statistics and database status: Hibernate supports Query cache and provide statistics
about query and database status.
Basics of Hibernate
Hibernate Architecture
Here, we will learn what are the major elements of hibernate. There is given two figures to understand the
hibernate architecture.
http://www.javatpoint.com/hibernate-tutorial
6/5/2014
Page 2 of 5
Here, we will see the 6 steps to connect to the database in java using Hibernate. You may also download the
jar files for hibernate here.
Generator classes
Here, we will learn about generator classes.
Hibernate Dialects
There are many dialect classes in hibernate. Here, we will learn about the dialect classes.
Mapping List
http://www.javatpoint.com/hibernate-tutorial
6/5/2014
Page 3 of 5
Let's map the list element using the mapping file. Here, we are containing the values in the list object not the
entity reference.
Mapping Bag
Here, we will map the list element using bag. It is non-indexed collection.
Mapping Set
Let's map the set object of a persistent class using set element.
Component Mapping
Component Mapping Tutorial
Let's see what is component mapping.
http://www.javatpoint.com/hibernate-tutorial
6/5/2014
Page 4 of 5
Hibernate Caching
Caching in Hibernate
Hibernate provides first level cache, second level cache and query cache strategies.
Reference Links
Hibernate Community
Wikipedia
Next Topic Hibernate Architecture
next>>
Hibernate Java
106
11
Hibernate Example
Share
Hibernate HQL
Hibernate LOG4J
8
186
Tweet
javatpoint.com
Like
.seuQ weivretnI
PSJ
telvreS
avaJ eroC
stcejjorP
stce orP
stcejjorP
stce orP
stcejorP avaJ eerF
sezz uQ
sezz uQ
sezziiiiuQ
sezz uQ
ziuq PSJ
ziuq telvreS
ziuq avaJ eroC
muroF
slairotuT
.seuQ diordnA
.seuQ etanrebiH
.seuQ gnirpS
.seuQ sturtS
.seuQ PSJ
.seuQ telvreS
.seuQ avaJ eroC
lairotuT XAJA
lairotuT C
lairotuT LQS
lairotuT tpircSavaJ
lairotuT diordnA
lairotuT etanrebiH
lairotuT 0.3 gnirpS
lairotuT 0.2 sturtS
lairotuT nrettaP ngiseD
lairotuT IPA liaM
lairotuT PSJ
lairotuT telvreS
lairotuT avaJ eroC
http://www.javatpoint.com/hibernate-tutorial
Blog
6/5/2014
http://www.javatpoint.com/hibernate-tutorial
6/5/2014
.devreseR sthgiR llA
.tnioptavaJ 3102-1102
SU TCATNOC
ziuq DCWCS/PJCO
ziuq diordnA
ziuq 2sturtS
lairotuT nevaM
ycnatlusnoC
lairotuT BXAJ
lairotuT tinUJ
Page 5 of 5