

H2 is an embedded, open-source, and in-memory database. The widely used in-memory database is H2. It is helpful for POCs (Proof of Concepts), not for a production application. It lost the data when the program is closed. In the case of the in-memory database, data store in the system memory. Some popular persistence databases are Oracle, MySQL, Postgres, etc. The data will be available even if the database server is bounced. The persistent database persists the data in physical memory. It creates the configuration automatically. The widely used in-memory databases are H2, HSQLDB (HyperSQL Database), and Apache Derby. The in-memory databases are volatile, by default, and all stored data loss when we restart the application.

The in-memory database is an embedded database. We use the in-memory database when we do not need to persist the data.

Because memory access is faster than disk access. In-memory database relies on system memory as oppose to disk space for storage of data. Next → ← prev Spring Boot H2 Database What is the in-memory database
