H2 Database Engine
Database management system
title: "H2 Database Engine" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["cross-platform-free-software", "embedded-databases", "free-computer-libraries", "free-database-management-systems", "java-(programming-language)-libraries", "relational-database-management-software-for-linux", "relational-database-management-systems", "serverless-database-management-systems", "software-using-the-mozilla-public-license"] description: "Database management system" topic_path: "technology/databases" source: "https://en.wikipedia.org/wiki/H2_Database_Engine" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Database management system ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | H2 Database Engine |
| logo | H2-logo.png |
| caption | H2 Database Engine |
| released | |
| latest release version | 2.4.240 |
| latest release date | |
| programming language | Java |
| operating system | Cross-platform |
| genre | Relational Database Management System |
| license | Eclipse Public License or Mozilla Public License 2.0 |
| website | |
| :: |
| name = H2 Database Engine | logo = H2-logo.png | caption = H2 Database Engine | screenshot = | collapsible = | developer = | released = | latest release version = 2.4.240 | latest release date = | latest preview version = | latest preview date = | programming language = Java | operating system = Cross-platform | genre = Relational Database Management System | license = Eclipse Public License or Mozilla Public License 2.0 | website = H2 is a relational database management system written in Java. It can be used as an embedded database in Java applications or run in client–server mode.
The software is available as open source software Mozilla Public License 2.0 or the original Eclipse Public License.
History
The development of the H2 database engine started in May 2004, and first published in December 2005. The database engine was written by Thomas Mueller. He also developed the Java database engine Hypersonic SQL. In 2001, the Hypersonic SQL project was stopped, and the HSQLDB Group was formed to continue work on the Hypersonic SQL code. The name H2 stands for Hypersonic 2, however H2 does not share code with Hypersonic SQL or HSQLDB. H2 is built from scratch.
Version 2.0.x was released in January 2022.
Features
A subset of the SQL (Structured Query Language) standard is supported. The main programming APIs are SQL and JDBC, however the database also supports using the PostgreSQL ODBC driver by acting like a PostgreSQL server.
It is possible to create both in-memory tables, as well as disk-based tables. Tables can be persistent or temporary. Index types are hash table and tree for in-memory tables, and b-tree for disk-based tables. All data manipulation operations are transactional. Table level locking and multiversion concurrency control are implemented. The two-phase commit protocol is supported as well, but no standard API for distributed transactions is implemented.
The security features of the database are: role based access rights, encryption of the password using SHA-256 and data using the AES or the Tiny Encryption Algorithm, XTEA. The cryptographic features are available as functions inside the database as well. SSL / TLS connections are supported in the client–server mode, as well as when using the console application.
The database supports protection against SQL injection by enforcing the use of parameterized statements. In H2, this feature is called 'disabling literals'.
Two full text search implementations are included, a native implementation and one using Lucene.
A simple form of high availability is implemented: when used in the client–server mode, the database engine supports hot failover (this is commonly known as clustering). However, the clustering mode must be enabled manually after a failure.
Since version 1.1.111, H2 in-memory database can run inside the Google App Engine.
References
References
- (6 August 2010). "Presentation and use of H2 Database Engine".
- [https://hsql.sourceforge.net/index.html Hypersonic SQL project page] at [[SourceForge]]
- "Write Your Own Database, Again". thecodist.com.
- "H2 Database supports PostgreSQL ODBC driver".
- "SQL Injections: How Not To Get Stuck".
- "H2 Clustering".
- "H2 Database on GAE". gaevfs.
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::