Introduction to Hibernate. Explain various features of Hibernate.

Leave a Comment

Hibernate is an open source object relational mapping tool fort the java platform.

Hibernate allows the Java developer to create persistent classes or persistent data without bothering about how to handle data.

Hibernate query language is an extension to SQL.

The main task of hibernate is mapping of Java classes to database tables. That means the Java data types are mapped to the SQL data types.

Hibernate provides data query and retrieval facilities. This feature avoids wastage of development time in manual data handling in SQL and JDBC.

The goal of hibernate is to relieve the developer from 95% of common data persistence related programming tasks.

The high performance, robust database application with Java can be easily built using the hibernate. For that purpose the developer has to do following things -

  • Write the simple Plain Old Java Object(POJO).
  • Create an XML mapping file which describes the relationship between database and class attribute.
  • Then call some hibernate API in order to store the persistent objects.


There are two alternatives for using hibernate - Use of SQL for creating and retrieving the data in the database but this alternative is not as much attractive as hibernate. The second alternative is use of Enterprise Java Beans i.e. EJB. The EJB is really a good alternative for hibernate but it requires EJB container.

0 comments:

Post a Comment