H2 ("Hypersonic 2") is an open-source lightweight relational database management system implemented in Java, supporting standard SQL API and JDBC API, as well as PostgreSQL ODBC driver. H2 is characterized by its fast performance and low memory requirement. H2 can be either embedded into a Java application or used as a database server. Both in-memory and disk-based database configurations are available. H2 also has strong security features.
The development of the H2 database engine started in May 2004, and first published in December 2005. The original developer, Thomas Mueller, also developed the Java database engine Hypersonic SQL (1998 - 2001), which is the origin of HSQLDB. The name H2 stands for Hypersonic 2, but it is built from scratch.
Multi-version Concurrency Control (MVCC)
The MVCC mode is enabled by default in version 1.4.x, with the default MVStore storage engine. It is disabled by default when using the default PageStore storage engine in version 1.3.x.
H2 uses Hash Table and AVL-Tree indexes for in-memory tables, and B-Tree indexes for disk-based tables. Indexes are created automatically for primary key and unique constraints. Multi-dimensional indexes is supported in H2. An algorithm called "bit-interleaving", which maps the multi-dimensional key to a single dimensional value on a space-filling curve, is implemented to execute multi-dimension (spatial) range queries efficiently.
Read Uncommitted Read Committed Serializable
H2 supports three isolation levels for all data manipulation language (DML) statements: Read Committed, Read Uncommitted and Serializable. The default level is "Read Committed" in most cases. Table level locking is used to make sure all connections only see consistent data. When MVCC is enabled (default setting in version 1.4.x when using the MVStore), instead of table level locking, rows are locked for update and "Read Committed" is used in all cases.
https://github.com/h2database/h2database
http://www.h2database.com/html/quickstart.html
Thomas Mueller
2004
Eclipse Public License, Mozilla Public License