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:
- Open Source and lightweight: It is open source anyone can download and use and Lightweight means easy to follow.
- 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.
- 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.
- Automatic Table Creation: In this we do not have to create table manually. It is created automatically in hibernate framework.
- Easy to use join: Fetching data from multiple tables is easy.
- Provides Query Statistics and Database Status. Because of cache support in hibernate it provide Query Statistics and Database Status.