Hibernate Info
What is Hibernate?
Hibernate is an object/relational mapping (ORM) and persistence/query framework. It allows a developer to treat a database like a collection of Java objects and also access it using native SQL or Hibernate Query Language (HQL).
A persistence framework moves transient program data in its most natural form to and from a permanent data store.
Main hibernate site: http://www.hibernate.org/
Hibernate tools for Eclipse: http://tools.hibernate.org/
Hibernate at wikipedia: http://en.wikipedia.org/wiki/Hibernate_%28Java%29
Hibernate in Sakai
There are multiple ways to use hibernate in Sakai. (See link above for info and code samples)
Advantages of hibernate
- Database independence - sits between the database and your java code, allows you to switch the database without changing any code, only a configuration file change is required
- Object / Relational Mapping (ORM) - Allows a developer to treat a database like a collection of Java objects. Includes support for multiple types of associations.
- Object oriented query language (HQL) - Fully supports polymorphic queries, native SQL, and Criteria queries
- Hibernate Mapping - Uses HBM XML files to map value objects (POJOs) to database tables
- Transparent persistence - Allows easy saves/delete/retrieve for simple value objects, uses Java reflection instead of byte code enhancement to achieve transparency
- High performance because it is such a lightweight framework