Background » Databases

MySQL

MySQL Logo

MySQL is a relational database management system. It is available for the most operating systems as an open source version and is used very often for web pages. MySQL keeps its data in tables, as other relational database management systems do (e.g. Oracle or MS SQL). The data is accessed with query language SQL.

Hibernate

Hibernate Logo

Hibernate is a object relational mapping framework (ORM). Hibernate was developed in Java but in meantime it also exists for other programming languages. Hibernate makes it possible to access a table oriented relational database with objects. This is an advantage, so from the program you can work with your normal objects and hibernate takes care of selecting, refreshing, deleting or inserting of datasets in tables. This makes it much more easier and faster to develop applications with database interaction.

Disadvantages of this are the lower database performance and that no stored procedures are supported, yet. But the advantages overbalance these issues. For the use of hibernate in web applications, it is important not to close the database session before the response to the client is sent. This could lead to exceptions and an inconsistency of the database.

Hibernate allows it to provide a three tier application architecture very elegant, which means the separation of user interface, the business and data layer.

A general database management system, like MySQL, is the backend of hibernate. The data access objects (DAOs) provide the interface to the business tier. The mapping of the data is managed in a file named hibernate.cfg.xml and a mapping file for each object class (*.hbm.xml).