Home Hibernate Hibernate Tutorial
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Hibernate Tutorial

Advertisement
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 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
Advertisements

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: April 15, 2013

Ask Questions?    Discuss: Hibernate Tutorial  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com