- Hibernate is an open source object/relational mapping tool for Java.
- It take care of handling Java objects to Database Objects.
- Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC.
- Hibernates goal is to relieve the developer from 95 percent of common data persistence related programming tasks like insert,select,update,delete operation queries.
- It’s an Powerful object-oriented query language
- Native SQL queries.
- Support new Criteria queries
- Transparent persistence without byte code processing.
- Automatic primary key generation
- High performance
- Highly scalable architecture.
- No “special” database tables.
- SQL generated at system initialization time.(Optional) Internal connection pooling and PreparedStatement caching
- Object / Relational mappings
Three different O/R mapping strategies
- Multiple-objects to single-row mapping.
- Polymorphic associations.
- Bidirectional associations.
- Connection Managment.[Connecting Database]
- Transaction Management.[Ability to execute more than one DB statemets]
- Object Relational Mapping.
- Hibernate makes use of persistent objects commonly called as POJO (POJO = “Plain Old Java Object”.) along with XML mapping documents for persisting objects to the database layer.
- The term POJO refers to a normal Java objects that does not serve any other special role or implement any special interfaces of any of the Java frameworks (EJB, JDBC, DAO, JDO, etc…).
- Rather than utilize byte code processing or code generation, Hibernate uses runtime reflection to determine the persistent properties of a class.[reflection is the process by which a computer program can observe (do type introspection) and modify its own structure and behavior at runtime]
- The mapping documents are compiled at application startup time and provide the framework with necessary information for a class. Additionally, they are used in support operations, such as generating the database schema or creating stub Java source files. More Info – http://www.allapplabs.com/hibernate/getting_started_with_hibernate_creating_pojo.htm