Jump to content

H2 Database Engine

From Alfawiki
Adapted from the English Wikipedia article H2 Database Engine, available under CC BY-SA 4.0Updated 9 August 2025
H2
Company typeOpen source
IndustrySoftware
FoundedMay 2004; 22 years ago (2004-05)
FounderThomas Mueller
ProductsRelational database management system
Websitewww.h2database.com

H2 is a relational database management system developed in the Java language. It operates either as an embedded database within Java applications or in a client–server configuration.

This software is distributed as open source under the terms of the Mozilla Public License 2.0 or the original Eclipse Public License.

History

The project commenced in May 2004, with its initial release arriving in December 2005. Created by Thomas Mueller, who also authored the Hypersonic SQL Java database engine, H2 represents a fresh codebase and does not share any source code with Hypersonic SQL or HSQLDB despite its name, which stands for Hypersonic 2.

The 2.0.x version series was launched in January 2022.

Features

H2 implements a portion of the SQL standard and primarily interacts through SQL and JDBC interfaces. Additionally, it can simulate a PostgreSQL server to utilize the PostgreSQL ODBC driver.

It supports both in-memory and persistent disk-based tables, which can be either temporary or permanent. Indexing options include hash table and tree structures for in-memory tables, while disk-based tables employ b-tree indexes. All data manipulation commands are transactional, leveraging table-level locks alongside multiversion concurrency control. Although it supports the two-phase commit protocol, there is no universal API for managing distributed transactions.

Security measures encompass role-based permissions, password hashing using SHA-256, and encryption of data via either the AES or Tiny Encryption Algorithm (XTEA). Cryptographic functions are integrated within the database engine. SSL/TLS encryption is available for client–server connections and through the console interface.

To mitigate SQL injection, H2 uses parameterized queries referred to as 'disabling literals.'

Two options for full text search are offered: a built-in solution and one based on Lucene technology.

For enhanced availability, H2 provides hot failover clustering in client–server mode; however, enabling clustering after failure events requires manual intervention.

Starting from version 1.1.111, H2’s in-memory database functionality became compatible with the Google App Engine environment.

See also

External links