Advantage of using Hibernate - Database Independence
This is probably stating the obvious, but one of the things that I like about using Hibernate is the simplicity it offers in regards to changing databases. The application that I am working on uses Derby as its RDBMS, however, I was having a few problems with it and wanted to change over to MySQL. Using Hibernate, all I had to change were a few lines in the hibernate.cfg.xml file and I was set. I ran my test suite and the whole thing just worked. Now granted, in the mapping files I had set the primary key to use native instead of hard wiring it. If I had not done this, I would have had to change 1 or 2 lines in every single mapping file, but still, not a lot of work to change databases.