Next >>>

Introduction Of Hibernate

Aim : Our tutorials are design for all the members who want to learn hibernate. It includes basics of hibernate and we try to teach you as easy as we can do. Let’s get started.

What is Hibernate?

Hibernate is a java framework which is used to develop a java applications to connect with database.It is open source( free to download and use),lightweight and ORM (Object Relational Mapping) tool. Hibernate implements the specifications of JPA(Java Persistence API) for data persistence.

ORM (Object Relational Mapping) Tool:

An ORM tool is used to create data, manipulate data, and data access. It is a technique to maps the object to the data stored in the database. Internally it uses the JDBC API to interact with database.

What is JPA?

Java Persistence API (JPA) is specifications that provide certain functionality and standard to ORM tools. The JPA classes and interfaces are inside the javax.persistance package.

Advantages of Hibernate Framework are:

  1. Open Source and lightweight: It is open source anyone can download and use and Lightweight means easy to follow.
  2. Fast Performance: The performance of hibernate is fast because it internally uses the cache memory. There are two type of cache which is used in hibernate first level cache and second level cache. By default first cache is unable.
  3. Database independent Query: HQL (Hibernate Query Language) is object oriented version of SQL.Database independent queries are generated by hibernate, so we don’t need to write database specific queries. Before Hibernate if we want to change our database we need to change our SQL query that leads to the maintenance problem.
  4. Automatic Table Creation: In this we do not have to create table manually. It is created automatically in hibernate framework.
  5. Easy to use join: Fetching data from multiple tables is easy.
  6. Provides Query Statistics and Database Status. Because of cache support in hibernate it provide Query Statistics and Database Status.