stored in: General and tagged:


Hibernate offers the ability to control the connection between the application and database for you, instead of spending long hours writing connection handling code, as well as ‘Bean populator’ code. By ‘Bean populator’ code, I mean the simple result set handling with the populating of JavaBeans. Much of this code is redundant, is relatively simple, and unnecessarily time consuming.

It works like this. By writing mapping files in XML, Hibernate is able to generate the CRUD (Create, Read, Update, Delete) statements for your application. This removes the need of the Java developer to be an expert in SQL. Granted, the SQL may not be too difficult, but I’ve seen some pretty nasty SQL code written by Java developers (myself included).

If a person is really in a crunch for time, by writing the mapping files Hiberate offers tools to generate the Java code (Beans), the database DDL, and all the relationships in between. This could be a great timesaver, enabling the developer to dedicate more time to ensuring the correct presentation and what not.

Look for more on this subject. I plan on writing a simple example application using MySQL and Java to explain the process.

Leave a Reply