Hibernate is Object Relational Solution (ORM) for Java. Hibernate was introduced in 2001 by Gavin King as an alternative for EJB2.
Before Hibernate introduced working with both Object-Oriented software and Relational Databases can be cumbersome and time consuming. Development costs are significantly higher due to a paradigm mismatch between how data is represented in objects versus relational databases.
Hibernate simplifies mapping from Java classes to database tables, and from Java data types to SQL data types. In addition, it provides data query and retrieval facilities. It can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC.
Hibernate’s design goal is to relieve the developer from 95% of common data persistence-related programming tasks by eliminating the need for manual, hand-crafted data processing using SQL and JDBC
The process of mapping Java Entity Object to Relational Database column called Object Relational Mapping (ORM). We will see about ORM in details in next post.
Advantage of Hibernate
- Light weight and open source under LGPL license.
- Hibernate take care mapping java object to database tables, saves manual coding works.
- Hibernate provides apis for storing and retrieving java object to and from database
- Changing from one database to another database easy, just we need to change configuration in XML or property file.
- Hibernate support all major RDBMS databases.