In-Memory Databases
Posted by Mike Haller
on Tuesday, May 5. 2009
at 21:58
in Java
For testing and demo installation purposes, or for in-memory data aggregation operations, it may be suitable to use a "nearly full-blown" database. They're called in-memory databases and there are some implementation for the Java platform which are used since years:hsqldb
One of the first 100% Java implementations of a SQL relational database management system. Like all the others, it can be run from a persistent file system or run in-memory. It's fast, it has a very low footprint and it can be embedded in any Java application. Hsqldb was my favourite for years to use in unit tests and integration tests. It can also read and write CSV files.
H2Database
The successor of hsqldb is H2. It's better documented, performs even better and has more options. There's even a web console where you can work with the data in the in-memory database like you can do with phpMyAdmin. Great thing. I'm currently using H2 at home and at work.
Derby
Derby, the Java database, now also supports the in-memory protocol. That's great to hear and an additional argument for switching to Derby as the default implementation for databases in embedded versions or for demo installations.
