H2 Database - Introduction

H2 Database - Introduction

H2 is a lightweight open source Java database. It can be embedded in Java applications or run in client-server mode. Basically, an H2 database can be configured to act as an in-memory database, which means the data will not be persisted to disk. Due to the built-in database, it is not used for product development, but is mainly used for development and testing.

This database can be used in embedded mode or server mode. Following are the main characteristics of H2 database −

  • Very fast, open source, JDBC API
  • Available in embedded and server modes; in-memory databases
  • Browser based console application
  • Small area - about 1.5 MB, file size

H2 database features

Key features of H2 database:

  • It is an extremely fast database engine.

  • H2 is open source and written in Java.

  • It supports standard SQL and JDBC APIs. It can also use the PostgreSQL ODBC driver.

  • It has embedded and server mode.

  • H2 supports clustering and multiversion parallelism .

  • It has strong security features.

It is an extremely fast database engine.

H2 is open source and written in Java.

It supports standard SQL and JDBC APIs. It can also use the PostgreSQL ODBC driver.

It has embedded and server mode.

H2 supports clustering and multiversion parallelism .

It has strong security features.

Additional features

Following are some additional features of H2 database −

  • H2 is databases and tables based on disk or in memory, support for read-only databases, temporary tables.

  • H2 provides support for transactions (read committed), 2-phase commit for multiple connections, table-level locking.

  • H2 is a cost-based optimizer that uses a genetic algorithm for complex queries that does not require administration.

  • H2 contains scrollable and updatable result set support, large result set, external sorting of results, functions can return a result set.

  • H2 supports encrypted database (AES), SHA-256 password encryption, encryption and SSL functions.

H2 is databases and tables based on disk or in memory, support for read-only databases, temporary tables.

H2 provides support for transactions (read committed), 2-phase commit for multiple connections, table-level locking.

H2 is a cost-based optimizer that uses a genetic algorithm for complex queries that does not require administration.

H2 contains scrollable and updatable result set support, large result set, external sorting of results, functions can return a result set.

H2 supports encrypted database (AES), SHA-256 password encryption, encryption and SSL functions.

Components in H2 database

To use the H2 database, you need to have the following components:

  • Web browser
  • H2 console server

This is a client-server application, so both a server and a client (browser) are required to run it.