๐ Learning and exploring H2 (the Java-based embedded SQL database).
The main features of H2 are:
- Very fast, open source, JDBC API
- Embedded and server modes; in-memory databases
- Browser based Console application
- Small footprint: around 2.5 MB jar file size
This codebase is my way of learning H2 and building a corpus of runnable reference code.
NOTE: This project was developed on macOS. It is for my own personal use.
This repository illustrates different concepts, patterns and examples via standalone sub-projects. Each sub-project is completely independent of the others and do not depend on the root project. This standalone sub-project constraint forces the sub-projects to be complete and maximizes the reader's chances of successfully running, understanding, and re-using the code.
The sub-projects include:
A simple Java program that embeds an in-memory H2 database.
See the README in basic/.
An intermediate H2 example program showcasing "server mode" and connection logging.
See the README in advanced/.
General clean-ups, TODOs and things I wish to implement for this project:
- DONE Showcase H2 logging config (I always want to know how to do logging to help observe a sophisticated system, like a database and database client).
- DONE Consider running H2 as a server (long-running process). I think this is a good idea because it will allow me to connect to the database from a GUI client (Intellij) and explore the db like I normally would.