To overcome these drawbacks, developers have the Object Relational Mapping (ORM) technique. ORM helps to manage the impedance mismatch between an object-oriented application and a relational database. ORM helps to write less complex applications. With the help of ORM frameworks, we can persist the objects to the relational tables using the mapping between the tables and the objects. iBatis, JPA and Hibernate are the ORM technologies which are on the market.
The advantages of using ORM are as follows:
ORM maps an object to the table
It supports its own query language instead of using SQL
Less database-dependent code
Low maintenance cost
Optimizes the performance by providing caching
Provides ways for automatic versioning and timestamping
Let's now discuss the Hibernate framework.