Home arrow Java arrow Page 3 - Installation and Set Up of Hibernate
JAVA

Installation and Set Up of Hibernate


Hibernate is an object/relational mapping service that bridges the worlds of Java objects and relational databases. If this sounds like it might be useful to you, keep reading. This article is excerpted from chapter one of Hibernate A Developer's Notebook, written by James Elliot (O'Reilly; ISBN: 0596006969).

Author Info:
By: O'Reilly Media
Rating: 4 stars4 stars4 stars4 stars4 stars / 8
July 27, 2006
TABLE OF CONTENTS:
  1. · Installation and Set Up of Hibernate
  2. · Getting an Ant Distribution
  3. · Getting the HSQLDB Database Engine
  4. · Getting Hibernate
  5. · Setting Up a Project Hierarchy
  6. · Setting Up a Project Hierarchy: A quick test

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Installation and Set Up of Hibernate - Getting the HSQLDB Database Engine
(Page 3 of 6 )

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% 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 HypersonicSQL, this is its current incarnation. Much of the Hibernate documentation uses the older name.)


TIP

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 HSQLDBproject. Usethe address below to find the current version of the database engine.


Why do I care?

Examples based on a database that everyone can download and easily experiment with mean you won’t have to translate any of the SQL dialects or operating system commands to work with your available databases (and may even mean you can save a day or two learning how to download, install, and configure one of the more typical database environments). Finally, 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 (athttp://hsqldb.sourceforge.net):

hsqldb is a relational database engine written in Java, with a JDBC driver, supporting a rich subset of ANSI-92 SQL (BNF tree format). It offers a small (less than 160k), fast database engine which offers both in memory and disk based tables. Embedded and server modes areavailable. Additionally, it includes tools such as a minimal web server, in-memory query and management tools (can be run as applets), and anumber of demonstration examples.

Go on, download HSQLDB. Heck, take two, they're small!

How do I do that?

Getting the database is simply a matter of visiting the project page at http://hsqldb.sourceforge.net and clicking the link to download the current stable version. This will take you to a typical SourceForge downloads page with the current release highlighted. Pick your mirror and download the zip archive. There’s nothing to install or configure; we’ll show you how to use it shortly.

What about…

…MySQL, PostgreSQL, Oracle, DB2, Sybase, Informix, or some other common database? Don’t worry, Hibernate can work with all these and others. We’ll talk about how you specify “dialects” for different databases later on. And if you really want, you can try to figure out how to work with your favorite from the start, but it will mean extra work for you in following along with the examples, and you’ll miss out on a great opportunity to discover HSQLDB.


blog comments powered by Disqus
JAVA ARTICLES

- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...
- Generics and Limitations in Java
- Getting Started with Java Web Development in...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials