What is Hibernate?
Hibernate is a pure Java object-relational mapping (ORM) and persistence framework that allows you to map plain old Java objects to relational database tables using (XML) configuration files. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.
What is ORM ?
ORM stands for object/relational mapping. ORM is the automated persistence of objects in a Java application to the tables in a relational database.
What does ORM consists of ?
An ORM solution consists of the following four pieces:
  1. API for performing basic CRUD operations
  2. API to express queries referring to classes
  3. Facilities to specify metadata
  4. Optimization facilities : dirty checking, lazy associations fetching
What are the ORM levels ?
The ORM levels are:
  1. Pure relational (stored procedure.)
  2. Light objects mapping (JDBC)
  3. Medium object mapping
  4. Full object Mapping (composition, inheritance, polymorphism, persistence by reach ability)
Why do you need ORM tools like hibernate?
The main advantage of ORM like hibernate is that it shields developers from messy SQL. Apart from this, ORM provides following benefits:
Improved productivity
  1. High-level object-oriented API
  2. Less Java code to write
  3. No SQL to write
Improved performance
  1. Sophisticated caching
  2. Lazy loading
  3. Eager loading
Improved maintainability
  1. A lot less code to write
Improved portability
  1. ORM framework generates database-specific SQL