Key-value database systems#

Key-value databases, also known as key value stores, store key/value pairs.

Database systems#

Key/value database systems are e.g. Riak, Cassandra, Redis and MongoDB.

Home

Riak

Cassandra

Redis

MongoDB

GitHub

basho/riak

apache/cassandra

redis/redis

mongodb/mongo

Docs

docs.riak.com

cassandra.apache.org/doc/

redis.io/documentation

docs.mongodb.com

Application areas

Session storage, Log data, Sensor data, CMS

Georedundancy, high writing speed, democratic peer-to-peer (P2P) architecture, data with a defined lifetime

Session Cache, Full Page Cache (FPC), Queues, Pub/Sub

IoT, Mobile apps, CMS, simple geospatial data, …

Development language

Erlang

Java

ANSI C

C++

Licenses

Apache License 2.0

Apache License 2.0

BSD-3-Clause License

Server Side Public License

Data model

Essentially Key/value pair

Column Family correspond to tables, keyspaces to databases; no logical structure, no scheme

Keys are stored as strings, values as strings, hashes, lists, sets and sorted sets

Flexible scheme with denormalised model

Query langauge

Keyfilter, MapReduce, Link walking, no ad hoc queries possible

Cassandra Query Language (CQL)

jQuery, MapReduce

Transactions, concurrency

ACID

Eventual Consistency

in-memory, asynchronous on disc with Append Only File Mode

Two-phase locking (2PL)

Replication, skaling

Multi-master replication

SimpleStrategy, NetworkTopologyStrategy and OldNetworkTopologyStrategy

Master-N-Slaves replication, Sharding using Consistent hash function

Master-Slave replication, Auto-Sharding

Remarks

See also Scylla, a Cassandra-compatible reimplementation in C.

See also KeyDB, a fork from Redis with multithreading.

BSON with a maximum document size of 16 MB.