A system and associated method write data from an in-memory database to a
disk database in an efficient manner and with a relatively short lag
time. The integration of data from in-memory to disk is achieved by
limiting the operations of the in-memory database to insert only. The
system shortens lag time by reducing the number of transactions required
to transfer data from in-memory database to disk memory. The system
compiles into an RDBMS, knowledge about the structure of the in-memory
database, and then uses the end of the transaction callbacks from the
RDBMS to keep the in-memory database and the disk memory in synch. The
RDBMS includes a daemon that runs periodically to find records in the
in-memory database that have not yet been written to the RDBMS, and then
writes the found records to the RDBMS as part of a single transaction. If
the transaction completes successfully, the in-memory database is updated
to reflect which records have been "flushed" to the RDBMS. If the
transaction fails, no action is taken. The present system synchronizes
the in-memory database with the RDBMS.