Hibernate Overview

Hibernate Overview
  • Hibernate is an Object-Relational Mapping (ORM) solution for JAVA.
  • It is an open source persistent framework created by Gavin King in 2001.
  • It is lightweight and overcomes all the shortcomings that we face while working with JDBC.
  • Hibernate is a framework in Java which comes with an abstraction layer and handles the implementations internally. The implementations include tasks like writing a query for CRUD operations or establishing a connection with the databases, etc.
  • Hibernate develops persistence logic, which stores and processes the data for longer use. It is lightweight and an ORM tool, and most importantly open-source which gives it an edge over other frameworks.
  • Hibernate maps Java classes to database tables and from Java data types to SQL data types and relieves the developer from 95% of common data persistence related programming tasks.
ORMapping

The process of mapping Java class with DB table, member variables with table columns and making that java class objects representing DB table rows by having synchronization between them is called ORMapping

  • Synchronization between object and table row is nothing but modification done in java object will reflect in table row and vice versa.
  • ORM software’s are responsible for this synchronization and to develop objects based ORMapping persistence logic.
  • In ORMapping Java class with DB table, member variables with table columns and making that java class objects representing DB table rows and there is no need of SQL queries. This makes ORMapping persistence logic’s as DB independent persistence logic.
  • Due to this, we can change DB software in middle of project development or utilization without disturbing the persistence logic.
class Employee {
   String empName;
   int empAge;
   String empAddress;
}
Capture

All ORM software’s internally use JDBC code to perform persistence operation on DB table rows.

Hibernate Overview
Scroll to top