-
Notifications
You must be signed in to change notification settings - Fork 32
HSQLDB
HSQLDB is a lightweight embeddable database written completely in Java. See also the Wikipedia entry on HSQLDB.
One of the most important features of HSQLDB is the ability to be run in embedded (in-process) mode. When running in the in-process mode, the database is initialized and started by the executing process. This requires no additional set-up of the database and is extremely helpful for testing.
To run HSQLDB in embedded mode with filesystem-based database use the following JDBC URL:
jdbc:hsqldb:target/test-database/database
This will create database named database
in target/test-database
folder.
You may also run the database completely in memory:
jdbc:hsqldb:mem:database
This is very useful for testing.
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
</dependency>
org.hsqldb.jdbcDriver
jdbc:hsqldb:target/test-database/database
Creates database.*
files in target/test-database
directory.
I have encountered an issue with date types and timezones in HSQLDB 1.7.3.3. Timezone was sometimes stored incorrectly. The problem is solved by updgrading to a higher version, for instance to 1.8.0.7.