An in-memory database (IMDB; also main memory database system or MMDB or memory resident database) is a database management system that primarily relies on main memory for computer data storage. It is contrasted with database management systems which employ a disk storage mechanism. Main memory databases are faster than disk-optimized databases since the internal optimization algorithms are simpler and execute fewer CPU instructions. Accessing data in memory eliminates seek time when querying the data, which provides faster and more predictable performance than disk.
In applications where response time is critical, such as telecommunications network equipment and mobile advertising networks, main memory databases are often used. IMDBs have gained a lot of traction, especially in the data analytics space, starting mid-2000s mainly due to cheaper RAM.
ACID support 
In their simplest form, main memory databases store data on volatile memory devices. These devices lose all stored information when the device loses power or is reset. In this case, MMDBs can be said to lack support for the durability portion of the ACID (atomicity, consistency, isolation, durability) properties. Volatile memory-based MMDBs can, and often do, support the other three ACID properties of atomicity, consistency and isolation. However, since Non-Volatile DIMMs (NVDIMM) have become available, most future IMDB or MMDB installations will indeed have the durability to meet full ACID support.
Many MMDBs have added durability via the following mechanisms:
- Snapshot files, or, checkpoint images, which record the state of the database at a given moment in time. These are typically generated periodically, or, at least when the MMDB does a controlled shut-down. While they give a measure of persistence to the data (in that not everything is lost in the case of a system crash) they only offer partial durability (as 'recent' changes will be lost). For full durability, they will need to be supplemented by one of the following:
- Transaction logging, which records changes to the database in a journal file and facilitates automatic recovery of an in-memory database.
- Non-Volatile DIMM (NVDIMM), a memory module that has a DRAM interface, often combined with NAND flash for the Non-Volatile data security. The first NVDIMM solutions were designed with supercapacitors instead of batteries for the backup power source. With this storage, MMDB or IMDB can resume securely from its state upon reboot.
- Non-volatile random access memory (NVRAM), usually in the form of static RAM backed up with battery power (battery RAM), or an electrically erasable programmable ROM (EEPROM). With this storage, the MMDB system can recover the data store from its last consistent state upon reboot.
- High availability implementations that rely on database replication, with automatic failover to an identical standby database in the event of primary database failure. To protect against loss of data in the case of a complete system crash, replication of a MMDB is normally used in conjunction with one or more of the mechanisms listed above.
Some MMDBs allow the database schema to specify different durability requirements for selected areas of the database - thus, faster-changing data that can easily be regenerated or that has no meaning after a system shut-down would not need to be journaled for durability (though it would have to be replicated for high availability), whereas configuration information would be flagged as needing preservation.
Hybrids with on-disk databases 
The first database engine to support both in-memory and on-disk tables in a single database was released in 2003. The advantage to this approach is flexibility: the developer can strike a balance between performance (which is enhanced by sorting, storing and retrieving specified data entirely in memory, rather than going to disk); cost, because a less costly hard disk can be substituted for more memory; persistence; and form factor, because RAM chips cannot approach the density of a small hard drive.
Manufacturing efficiency is another reason a combined in-memory/on-disk database system may be chosen. Some device product lines, especially in consumer electronics, include some units with permanent storage, and others that rely on memory for storage (set-top boxes, for example). If such devices require a database system, a manufacturer can adopt a hybrid database system at lower and upper cost, and with less code customization, than using separate in-memory and on-disk databases, respectively, for its disk-less and disk-based products.
Storage memory 
Another variation is to have large amounts of nonvolatile memory in the server. For example Flash memory chips as addressable memory rather than structured as disk arrays. A database in this form of memory combines very fast access speed with persistence over reboots and power losses.
|MemSQL||MemSQL, Inc.||Proprietary||SQL relational|
|EXASolution ||EXASOL||Proprietary||Relational (SQL, ODBC, JDBC, ADO.NET), multi-dimensional (MDX, XMLA); EXASOL leads the well-respected international TPC-H benchmark, since 2008, in the datavolume-based categories 100GB, 300GB, 1TB, 3TB, and 10TB; EXASolution architecture: shared-nothing, column-store, in-memory database|
|WebDNA 7||WebDNA Software Corporation||Freeware||Robust hybrid in-memory database system and scripting language designed for the World Wide Web|
|Oracle Exalytics||Oracle Corporation||Proprietary||Appliance|
|H2 (DBMS)||Thomas Müller||Mozilla Public License or Eclipse Public License||For Java|
|Oracle Coherence||Oracle Corporation||Proprietary with developer download||For Java, relational, distributed|
|Hazelcast||Hazelcast Team||Open source (Apache License 2.0)||For Java, NoSQL, distributed|
|SAP HANA||SAP AG||Proprietary|
|Datablitz (formerly Dali)||Bell Labs (Alcatel-Lucent)||Proprietary||Dali prototype was developed for in-house Bell Labs needs|
|Polyhedra||ENEA AB (previously Perihelion Software)||Proprietary, with a free to use edition (Polyhedra Lite)||Relational (SQL, ODBC, JDBC) in-memory database system originally developed for use in SCADA and embedded systems, but used in a variety of other applications including financial systems. Supports data durability via snapshots and journal logging, and high availability via a hot-standby. First release was in 1993; 8.7 released in March 2013. Polyhedra Lite was released under a free-to-use license in 2012.|
|Kognitio Analytical Platform||Kognitio, Limited||Proprietary||Development of an in-memory database, specialized for analytical workloads was started at White Cross Systems, Limited in 1988. The first beta release of that system was in 1989. It was based on the INMOS Transputer. The first full production release was offered in 1992. White Cross merged in 2005 with Kognitio, Limited in the United Kingdom and is currently marketing version 8 of the same code base as the "Kognitio Analytical Platform".|
|Ehcache||Terracotta, Inc. (Software AG)||Open source (Apache License)||For Java, distributed|
|TimesTen||Oracle Corporation||Proprietary||Standalone database or in-memory cache for Oracle Database|
|ALTIBASE HDB||Altibase Corporation||Proprietary||"Hybrid DBMS" that combines an in-memory database with a conventional disk-resident database|
|Microsoft COM+ IMDB||Microsoft Corporation||Proprietary||Defunct|
|eXtremeDB||McObject LLC||Proprietary||Variety of editions|
|VoltDB||VoltDB Inc.||Open source (GPL) / Proprietary||Relational; implements H-Store design|
|BigMemory||Terracotta, Inc. (Software AG)||Proprietary (free editions)|
|Xeround||Xeround Inc.||Proprietary/Not for sale, service only||Cloud database|
|SQLFire||VMware||Proprietary||Relational, distributed, NewSQL|
Many DBMS support in-memory-only storage engines, including:
See also 
- Distributed data store
- Embedded databases
- Comparison of relational database management systems
- "Definition: in-memory database". WhatIs.com. Retrieved 19 January 2013.
- Michael Vizard. "The Rise of In-Memory Databases". Slashdot. Retrieved 19 January 2013.
- "TeleCommunication Systems Signs up as a Reseller of TimesTen; Mobile Operators and Carriers Gain Real-Time Platform for Location-Based Services". Business Wire. 2002-06-24.
- "Falling RAM Prices Drive In-Memory Database Surge". SAP. Retrieved 19 January 2013.
- "Rise of In-Memory Databases Impacts Wide Range of Jobs". Dice.com. May 4, 2012. Retrieved 19 January 2013.
- Non-Volatile Memory http://www.vikingtechnology.com/nvdimm-technology
- Whole-system Persistence with Non-volatile Memories http://research.microsoft.com/apps/pubs/default.aspx?id=160853
- The Bleak Future of NAND Flash Memory http://research.microsoft.com/apps/pubs/default.aspx?id=162804
- "Solid Announces General Availability of BoostEngine 4.0, the First On-Disk/In-Memory Hybrid Database Manager" (Press release). PR Newswire. 2003-04-28.
- "Truly these are the GOLDEN YEARS of Storage."
- Enea Adds Fine-Grain Locking and Cascaded Deletes to the World's Best Relational In-Memory Database Server, Press Release (8.7), Enea AB.
- Polyhedra Lite In-Memory Relational Database System Freeware Available Now from Enea, Press Release, Reuters.
- RDM In-Memory Database Features
- Jack Belzer. Encyclopedia of Computer Science and Technology - Volume 14: Very Large Data Base Systems to Zero-Memory and Markov Information Source. Marcel Dekker Inc. ISBN 0-8247-2214-0.