A Quick Introduction of Hibernate for Beginners

Hibernate is an object-relational persistence (ORM) framework which maps plain old Java objects (POJOs) to relational database tables and transforms the data from one representation to the other.

Metadata (specified in XML file or using annotations) maps the fields of a class to the columns of a table so that a persisted instance of the class is represented by a row in the table.

The SQL required to update and query the database is automatically generated by Hibernate Framework, so the developer no longer needs to write repetitive CRUD style SQL statements by hand.

These are the main components of Hibernate:

  •  Metadata to describe the mapping between classes and tables.
  •  A query language and API.
  •  API for CRUD operations on the objects of persistent classes.
  •  Transaction management and optimization functions.