You can use an embedded database written in Java, such as Java DB (Sun-supported Apache Derby distribution), HSQLDB , or H2 (creator of HSQLDB). H2 has its own preferences and is wise (some comparisons are here , here and here ) and because of compatibility with other databases (it is very good when H2 is not your target database, but may not matter in your context).
source share