H2 Database Engine

h2database.com ↗

Use a small Java SQL database in embedded, in-memory, or client/server mode through JDBC.

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about H2 Database Engine

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the H2 Database Engine homepage

What it does

H2 is a Java SQL database engine that supports embedded and server modes, disk-based or in-memory databases, and a browser-based Console application. Its quickstart introduces the JDBC driver and a database URL, so a Java program can connect to a local database without a separate server process in embedded mode. The project also documents transactions, multi-version concurrency, encrypted databases, and full-text search. H2 is an engine and development utility, not a managed database service.

A local JDBC database in a few setup choices

The H2 quickstart asks you to add the H2 JAR to the application's classpath, use org.h2.Driver, and choose a JDBC URL. For example, jdbc:h2:~/test opens a database named test in the user's home directory; this is a documented illustrative URL, not a connection made for this listing. The quickstart also introduces the web Console for accessing a database through a browser.

Choose the mode to match the task. Embedded mode is convenient for a small Java application or test fixture, while server mode exposes a database to client connections. The project also supports in-memory databases for temporary work and disk-based storage when data should persist. Make the URL and persistence choice explicit so a development database does not accidentally become a shared service.

H2 is pure Java and includes its JDBC API, but the reader needs a compatible Java setup and must select the right mode for the application. It is useful for Java development and local data workflows; it is not a substitute for operating a production database service without evaluating deployment, security, and durability requirements. H2 is dual-licensed under MPL 2.0 or EPL 1.0.

Strengths

  • Supports embedded and client/server modes, as well as disk-based and in-memory databases.
  • The official quickstart gives a concrete JDBC driver and URL for the first connection.
  • A browser-based Console is included for database access.

Watch out for

  • Java applications need the H2 driver and an appropriate JDBC URL; embedded and server modes are configured differently.
  • A local development engine does not provide the managed operations of a database hosting service.

Best for

  • Java applications that need an embedded SQL database or a local test database
  • Trying database behavior in a disk-based, in-memory, or client/server setup

Sources