Hibernate Core

From Wikipedia, the free encyclopedia

Hibernate core is the most popular Java ORM persistence tool. It provides automatic and transparent object/relational mapping allowing java objects to persist in a database after the java program exits.

In essence, the developer first provides mapping between fields in the Java classes and columns in the relational database tables, for those Java classes that need to be persisted in the database. The mapping is saved in a configuration file. If Spring Framework is used, that configuration can be conveniently integrated into the Spring bean XML configuration file.

Then the developer can manipulate those Java objects (which are more easily interpreted in the business domain language )in the program and at the same time inserting, updating, deleting, or not affecting the corresponding database tables, depending on whether or the Java objects are attached to a Hibernate session. Transaction management provided by Spring Framework can also conveniently integrate database transaction managed with Hibernate.

For example in a company administration application, employee may be mapped to a relational database table. In the business domain language, a new employee may be recruited, an existing employee's data may be updated, or an existing employee leaves. Correspondingly a new row in the table may be inserted, an existing row updated, or an existing row deleted automatically by database SQL statement(s) generated by Hibernate.

[edit] See also

  • nhybernate