Are there any in-memory hybrid databases available

database-recommendation

I am looking for a database that is –

  • Relational (Not NoSQL).
  • Has an in-memory store.
  • Has disk-based backing storage.

I want to set up a system where entire contents of the disk are replicated in memory. So writes are made to both the in-memory store and disk, but reads are done only against memory.

Most of the databases I have seen such as H2 or HSQLDB offer in memory grid or disk based tables. I am looking for an in-memory grid WITH disk based backing storage.

Is there such a database system available or is it possible to configure MySQL (or some other) database to work in such a manner?

Best Answer

H2 and HSQLDB will cache the tables in memory, even if you use "persistent" tables.

In HSQLDB you can control the amount of memory that is used to hold table data, using the SET FILES CACHE SIZE statement. I think H2 has something similar.

So if you create cached tables and make the data cache large enough you will wind up with tables stored on disk but held in memory.