Hibernate Tutorial

This section contains the various aspects of Hibernate. Here we will read What is hibernate ?, Features of Hibernate, Compatibility with the various databases, Hibernate dialect of various databases, Architecture of Hibernate, How to download hibernate ?, Hibernate Versions etc.


Hibernate 5.3 features Hibernate 5 JPA Configuration Hibernate 5 persistence.xml example Hibernate 5 JPA Tutorial Hibernate and JPA Example How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 Annotations Maven dependency Hibernate 5 annotationconfiguration Doctype Hibernate-configuration 5 Hibernate 5 Dialect Hibernate 5 configuration dtd Hibernate 5 Hello World Getting started with Hibernate 5 Hibernate 5.2.10 jar Download Hibernate 5.2.10 Maven Dependency Hibernate 5 Maven Dependency Hibernate 5 native query example Hibernate 5 query deprecated When should you use Hibernate? What's new in Hibernate 5? How much time it takes to learn Hibernate? Hibernate envers custom revinfo table Hibernate 5 Envers Hibernate Envers get all revisions Hibernate Examples Hibernate 5 build SessionFactory Example Hibernate 5 SessionFactory Example Hibernate 5 Annotation Example How to download Hibernate 5.x? Hibernate 5 Features Hibernate 5 Tutorials Learning Hibernate ORM - Free Training/Tutorial videos of Hibernate ORM with Java How to write hello world example program in Hibernate? How to create one to one relationship in Hibernate 4 with Annotation? How to calculate minimum in Hibernate using the min() Function Hibernate ORM 4.2.21.Final Released - Create CURD application in latest Hibernate Hibernate ORM 4.2.21 Tutorial - Learn Hibernate ORM Framework Hibernate Error: Failed to create sessionFactory object.java.lang.NoClassDefFoundError How to create Hibernate Project in Eclipse? Examples of Hibernate Criteria Query

Hibernate Tutorial

This section contains the various aspects of Hibernate. Here we will read What is Hibernate, Features of Hibernate, Compatibility with the various databases, Hibernate dialect of various databases, Architecture of Hibernate, How to download hibernate, Hibernate Versions etc.

What is Hibernate ?

Hibernate is a persistence tool for Java (supported versions Java SE 5.0 and later, J2SE 1.4 and later) famous as an Object-Relational Mapping (ORM) framework for Java. Hibernate is provided by the JBoss organization and is distributed as an open source under GNU Lesser General Public License. Hibernate was started in 2001 and is created by Gavin King. Initially it was started with the goal to provide the use of entity beans in EJB2 style. But recently it focused on to providing a better persistence capabilities. Many of the improvements made in Hibernate's features as how the days passed. Hibernate Community time-to-time releases its new versions, each newer version contains the new feature than the older. Before releasing the Hibernate newer version as a final it releases the unstable versions that takes some fewer new features or it may be release for getting the feedback of its user. Generally Hibernate is called with its versions like Hibernate2, Hibernate3, Hibernate4 etc. Now Hibernate is also available for .NET (supported versions 1.1 and 2.0).

Features of Hibernate

  1. The basic feature of Hibernate is that it maps the Java classes and data types to a Database tables and SQL data types respectively using an XML file. This feature helps the developer to write less line of code.
  2. Java objects storing to and retrieving from database: A developer is not required to write the additional line of code for storing the data to and retrieving from the database. Hibernate provides the simple methods for this purposes.
  3. Not to worry about the unfamiliar SQL data types : A Java developer should not to worry about the use of unfamiliar SQL data types instead they can continue their work with the familiar Java Objects.
  4. It is operated without any application server.
  5. Reduce database access complexity by easy fetching techniques.
  6. It has easy and simple query for data access

Compatibility With The Various Databases

Hibernate supports various databases. Some of these are as follows :

  • MySQL
  • Oracle
  • PostgreSQL
  • FrontBase
  • DB2/NT
  • Microsoft SQL Server Database
  • Sybase SQL Server
  • Informix Dynamic Server
  • HSQL Database Engine

Hibernate dialect of various databases

To use the different databases in hibernate there are corresponding dialects that should be used. The database and the corresponding dialects are tabled below :

RDBMS Dialect
MySQL5 org.hibernate.dialect.MySQL5Dialect
MySQL5 with InnoDB org.hibernate.dialect.MySQL5InnoDBDialect
MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect
Oracle (any version) org.hibernate.dialect.OracleDialect
Oracle 9i org.hibernate.dialect.Oracle9iDialect
Oracle 10g org.hibernate.dialect.Oracle10gDialect
Oracle 11g org.hibernate.dialect.Oracle10gDialect
DB2 org.hibernate.dialect.DB2Dialect
DB2 AS/400 org.hibernate.dialect.DB2400Dialect
DB2 OS390 org.hibernate.dialect.DB2390Dialect
PostgreSQL org.hibernate.dialect.PostgreSQLDialect
Microsoft SQL Server 2000 org.hibernate.dialect.SQLServerDialect
Microsoft SQL Server 2005 org.hibernate.dialect.SQLServer2005Dialect
Microsoft SQL Server 2008 org.hibernate.dialect.SQLServer2008Dialect
SAP DB org.hibernate.dialect.SAPDBDialect
Informix org.hibernate.dialect.InformixDialect
HypersonicSQL org.hibernate.dialect.HSQLDialect
H2 Database org.hibernate.dialect.H2Dialect
Ingres org.hibernate.dialect.IngresDialect
Progress org.hibernate.dialect.ProgressDialect
Mckoi SQL org.hibernate.dialect.MckoiDialect
Interbase org.hibernate.dialect.InterbaseDialect
Pointbase org.hibernate.dialect.PointbaseDialect
FrontBase org.hibernate.dialect.FrontbaseDialect
Firebird org.hibernate.dialect.FirebirdDialect
Sybase org.hibernate.dialect.SybaseASE15Dialect
Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect

Hibernate Architecture

Hibernate architecture is designed as that it acts as a mediator between the Java application and the database for providing persistence services. The developer has no need to interact with the database he/she is only concerned with the Java object that has to be persist. There are various of Java APIs that are used by the Hibernate these are JDBC, JTA (Java Transaction API), JNDI (Java Naming and Directory Interface). JDBC allows hibernate to interact with all most any database with the corresponding JDBC driver supported by it. Hibernate integrates with the J2EE application using JNDI and JTA.

How to download hibernate ?

To download the latest version of hibernate you can click here

Hibernate Versions

As we have discussed earlier that Hibernate community releases the Hibernate's new versions time to time. Hibernate community makes the changes in the earlier versions to improve the functionality of Hibernate. In each of the hibernate version the organization added some new features by adding new classes, methods, etc and removes the classes, methods etc. those reported a bug or creates problem for the application. Following are the major versions release by the community :

  • Hibernate ORM 4.3.0.Beta1 Release : Current version release by the community at the time of writing this tutorial.
  • Hibernate 4
  • Hibernate 3
  • Hibernate 2
  • First final release of hibernate was Hibernate 1
Share on Google+Share on Google+

Hibernate Tutorial

Posted on: April 15, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: Hibernate Tutorial  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image