Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Hibernate Hibernate Architecture

 
 

Share on Google+Share on Google+

Hibernate Architecture

Advertisement
In this lesson you will learn the architecture of Hibernate. The following diagram describes the high level architecture of hibernate.

Hibernate Architecture

     

In this lesson you will learn the architecture of Hibernate.  The following diagram describes the high level architecture of hibernate:

The above diagram shows that Hibernate is using the database and configuration data to provide persistence services (and persistent objects) to the application.

To use Hibernate, it is required to create Java classes that represents the table in the database and then map the instance variable in the class with the columns in the database. Then Hibernate can be used to perform operations on the database like select, insert, update and delete the records in the table. Hibernate automatically creates the query to perform these operations.

Hibernate architecture has three main components:

  • Connection Management
    Hibernate Connection management service provide efficient management of the database connections. Database connection is the most expensive part of interacting with the database as it requires a lot of resources of open and close the database connection.  

  • Transaction management:
    Transaction management service provide the ability to the user to execute more than one database statements at a time.

  • Object relational mapping:
    Object relational mapping is technique of mapping the data representation from an object model to a relational data model. This part of the hibernate is used to select, insert, update and delete the records form the underlying table. When we pass an object to a Session.save() method, Hibernate reads the state of the variables of that object and executes the necessary query.

Hibernate is very good tool as far as object relational mapping is concern, but in terms of connection management and transaction management, it is lacking in performance and capabilities. So usually hibernate is being used with other connection management and transaction management tools. For example apache DBCP is used for connection pooling with the Hibernate.

Hibernate provides a lot of flexibility in use. It is called "Lite" architecture when we only uses the object relational mapping component. While in "Full Cream" architecture all the three component Object Relational mapping, Connection Management and Transaction Management) are used.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 19, 2008

Related Tutorials

Discuss: Hibernate Architecture   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:10
srilakshmi
August 21, 2011
hibernet and java

plz send java information
V Srinivasan
October 18, 2011
About the Tutorial

Very good tutorial
rajdeo kumar
October 26, 2011
hibernate

The above diagram is not completely showing the internal arcchitecture.
Rajesh
December 2, 2011
cursors in oralce

What is cursors in Oracle DB
Mahesh
January 6, 2012
Nice Article

Good information provided.
manoj
March 31, 2012
java hibernate

full information with practical of hibernet.. and how to run hibernate
Lawrence Philips
July 6, 2012
proofreading for syntax

"Transaction management service provide the ability to the user to execute more than one database statements at a time." Transaction management service provides the ability to the user to be able to execute more than one database statement at a time. This is an excellent and very useful tutorial, but it should be edited for syntax
sachchidanand
July 25, 2012
hibernate

pls provide how to start project on hibernate.
hi
September 28, 2012
ok

ok
vijay
July 13, 2013
what is hibernate pool memory

i have completed in hibernate application but some times pool memory problem
DMCA.com