Hibernate
- Hibernate is a high-performance Object/Relational persistence and query service.
- The most popular.
- The most flexible and powerful Object/Relational solution on the market.
- It provides data query and retrieval facilities that significantly reduce development time. 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.
- Hibernate is free software that is distributed under the GNU Lesser General Public License.
- Hibernate solves object-relational impedance mismatch problem.
- Hibernate was started in 2001 by Gavin King as an alternative to using EJB2-style entity beans.
Benefits of Hibernate
- The SQL code / statements in the application can be eliminated without writing complex JDBC / Entity Bean code.
- Distributed transaction can simply be performed by using ORM tools.
- Hibernate is an open source ORM tool and a robust framework to perform ORMapping.
- Without much of SQL knowledge, one can master Hibernate easily.
- Caching objects
- Executing SQL statements later, when needed
- Never updating unmodified objects
- Efficient Collection Handling
- Rolling two updates into one
- Updating only the modified columns
- Outer join fetching
- Lazy collection initialization
- Lazy object initialization
- Transparent persistence & retrieval of objects
- Persistence of associations and collections
- Guaranteed uniqueness of an object (within a session).
- O-R mapping using ordinary JavaBeans
- Can set attributes using private fields or private setter methods
- Lazy instantiation of collections (configurable)
- Polymorphic queries, object-oriented query language
- Cascading persist & retrieve for associations, including collections and many-to-many
- Transaction management with rollback
- Can integrate with other container-provided services
Drawbacks of Using Hibernate
- High Level abstraction obscuring what is happening under the hood.
- Runs on top of JDBC.
- Support for Hibernate on Internet is not sufficient.
- For complex data, mapping from Object-to-tables and vise versa reduces performance and increases time of conversion.
- Anybody wanting to maintain application using Hibernate will need to know Hibernate.
- Hiberna te does not allow some type of queries which are supported by JDBC .
Why Hibernate and not JDBC?
- JDBC maps Java classes to database tables (and from Java data types to SQL data types)
- Hibernate automatically generates the SQL queries.
- Hibernate provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC.
- Makes an application portable to all SQL databases.
If you want to learn more about the Hibernate ORM tool then you can visit to the Techknow Heights (www.tkhts.com) and can learn more about the Hibernate.
No comments:
Post a Comment