InfoQ

News

H2 Database by Hypersonic Creator Nearing 1.0

Posted by Floyd Marinescu on May 25, 2006 08:38 PM

Community
Java
Topics
Data Access,
Transactions Processing
Tags
H2,
JDBC,
Hypersonic DB
HSQLDB creator Thomas Mueller recently released the v0.9 of H2, a pure Java database successor to HSQLDB. H2 benchmarks significantly faster than  HSQLDB, supports JDBC and ODBC, disk based or in-memory operation, supports XA, can be clustered for HA, supports encryption, and includes a web console app.

v0.9 addresses bug fixes and also adds CSV import/export, the REAL data type is supported, better performance for joins, access rights for views, and invalid views (if a table is dropped).

H2 was first announced in mid-december 2005 and work has progressed steadily since.  Thomas'  priority for H2 is currently compatibility and performance on the low end (single user, Access, Embedded), so features such as better transaction isolation support (it currently only supports serializable) will be implemented later.

Comparison to Other Database Engines

Feature H2 HSQLDB Derby Daffodil MySQL PostgreSQL
Embedded Mode (Java) Yes Yes Yes Yes No No
Performance (Embedded) Fast Fast Slow Slow N/A N/A
Performance (Server) Fast Fast Slow Slow Slow Slow
Transaction Isolation Yes No Yes Yes Yes Yes
Cost Based Optimizer Yes No Yes Yes Yes Yes
Clustering Yes No No No Yes Yes
Encrypted Database Yes No Yes No No No
Files per Database Few Few Many Few Many Many
Footprint (jar/dll size) ~ 1 MB ~ 600 KB ~ 2 MB ~ 3 MB ~ 4 MB ~ 6 MB
(From H2 Feature page)

H2 has also benchmarked sigificantly faster than other open source databases, including HSQLDB:



According to Thomas,  H2 may be merged back to HSQLDB at some point in the future, but not yet, which is one reason why the license is not GPL / LGPL / Apache style, although it is free and open source.

6 comments

Reply

Native vs. Java versions by Horia Muntean Posted May 26, 2006 1:22 AM
Re: Native vs. Java versions by Tim Vernum Posted May 28, 2006 11:12 PM
Also, locking modes by Horia Muntean Posted May 26, 2006 1:29 AM
Re: Also, locking modes by Floyd Marinescu Posted May 26, 2006 8:59 AM
Free and open source. by Tim Vernum Posted May 28, 2006 11:10 PM
Embedded MySql by Pete the Wheat Posted Jun 1, 2006 2:38 AM
  1. Back to top

    Native vs. Java versions

    May 26, 2006 1:22 AM by Horia Muntean

    It's also important to know that it is "Written Java; also available as native executable". Any comparisons between those versions?

  2. Back to top

    Also, locking modes

    May 26, 2006 1:29 AM by Horia Muntean

    Read carefully the "Locking, Lock-Timeout, Deadlocks" section from http://www.h2database.com/html/frame.html IMHO the table level locking for managing concurent access is quite a problem for multiple users scenarios. May be DB2 is slower but IBM uses row based locking, a policy that can give you more throughput in multiple users usecases.

  3. Back to top

    Re: Also, locking modes

    May 26, 2006 8:59 AM by Floyd Marinescu

    Read carefully the "Locking, Lock-Timeout, Deadlocks" section from http://www.h2database.com/html/frame.html IMHO the table level locking for managing concurent access is quite a problem for multiple users scenarios. May be DB2 is slower but IBM uses row based locking, a policy that can give you more throughput in multiple users usecases.
    True, but as mentioned in the article, Thomas' first priority is making the DB work best "on the low end (single user, Access, Embedded)". I think this is the largest use scenario for HSQLDB and H2. Here at InfoQ we used HSQLDB on developer dev machines (single user, embedded) to simplify the environment instead of the production DB.

  4. Back to top

    Free and open source.

    May 28, 2006 11:10 PM by Tim Vernum

    It's free, but it's not technically open source. (I'm not an open source zealot, but I am an accuracy zealot) From the FAQ: Is this Database Engine Open Source? It is free to use and distribute, and the source code is included. But currently does not have a 'open source style license', but this will probably change soon. See also under license.

  5. Back to top

    Re: Native vs. Java versions

    May 28, 2006 11:12 PM by Tim Vernum

    The FAQ covers it briefly. http://www.h2database.com/html/faq.html The GCJ version is not as stable as the Java version. Currently, the GCJ version is also slower than when using the Sun VM.

  6. Back to top

    Embedded MySql

    Jun 1, 2006 2:38 AM by Pete the Wheat

    The comparison states that MySql doesn't run in "embedded mode". I thought it did since version 5.0?

Exclusive Content

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.

Architectures of extraordinarily large, self-sustaining systems

Can a system that is so large it cannot be comprehended be "designed" in a conventional sense? The foundations of computing are about to change. In this talk, Richard P. Gabriel explores why and how.