Get HSQLDB

Hibernate works with a great many relational databases; chances are, it will work with the one you are planning to use for your next project. We need to pick one to focus on in our examples, and luckily there’s an obvious choice. The free, open source, 100-percent Java HSQLDB project is powerful enough that it forms the backing storage for several of our commercial software projects. Surprisingly, it’s also incredibly self-contained and simple to install, so it’s perfect to discuss here. (If you’ve heard of Hypersonic-SQL, this is its current incarnation. Much of the Hibernate documentation uses the older name.)

Note

Don’t panic if you end up at http://hsql.sourceforge.net/ and it seems like the project has been shut down. That’s the wrong address; it’s talking about the predecessor to the current HSQLDB project. Use the address below to find the current version of the database engine.

So why HSQLDB? Basing our examples on a database that everyone can download and easily experiment with means you won’t have to translate any of the SQL dialects or operating system commands to work with your available databases (and it may even mean you can save a day or two learning how to download, install, and configure one of the more typical database environments). Also, if HSQLDB is new to you, chances are good you’ll be impressed and intrigued, and may well end up using it in your own projects. As it says on the project home page (at http://hsqldb.org/):

HSQLDB is the leading SQL relational ...

Get Getting Started with Hibernate 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.