Hubbry Logo
search button
Sign in
Key–value database
Key–value database
Comunity Hub
arrow-down
History
arrow-down
starMore
arrow-down
bob

Bob

Have a question related to this hub?

bob

Alice

Got something to say related to this hub?
Share it here.

#general is a chat channel to discuss anything related to the hub.
Hubbry Logo
search button
Sign in
Key–value database
Community hub for the Wikipedia article
logoWikipedian hub
Welcome to the community hub built on top of the Key–value database Wikipedia article. Here, you can discuss, collect, and organize anything related to Key–value database. The purpose of the hub is to con...
Add your contribution
Key–value database
A tabular data card proposed for Babbage's Analytical Engine showing a key–value pair, in this instance a number and its base-ten logarithm

A key-value database, or key-value store, is a data storage paradigm designed for storing, retrieving, and managing associative arrays, a data structure more commonly known today as a dictionary or hash table. Dictionaries contain a collection of objects, or records, which in turn have many different fields within them, each containing data. These records are stored and retrieved using a key that uniquely identifies the record, and is used to find the data within the database.[1][2]

A table showing different formatted data values associated with different keys

Key-value databases work in a very different fashion from the better known relational databases (RDB). RDBs pre-define the data structure in the database as a series of tables containing fields with well defined data types. Exposing the data types to the database program allows it to apply a number of optimizations. In contrast, key-value systems treat the data as a single opaque collection, which may have different fields for every record. This offers considerable flexibility and more closely follows modern concepts like object-oriented programming. Unlike most RDBs, in key-value databases optional values are not represented by placeholders or input parameters and as a result key-value databases use far less memory to store the same data. This can lead to large performance gains in certain types of workloads.[citation needed]

Performance, a lack of standardization and other issues have limited key-value systems to niche uses for many years, but the rapid move to cloud computing after 2010 has led to a renaissance as part of the broader NoSQL movement. Some graph databases, such as ArangoDB,[3] are also key–value databases internally, adding the concept of the relationships (pointers) between records as a first class data type.

Types and examples

[edit]

Key-value databases can use consistency models ranging from eventual consistency to serializability. Some support ordering of keys.

Some maintain data in memory (RAM), while others employ solid-state drives or rotating disks.[1]

Every entity (record) is a set of key–value pairs. A key has multiple components, specified as an ordered list. The major key identifies the record and consists of the leading components of the key. The subsequent components are called minor keys. This organization is similar to a directory path specification in a file system (e.g., /Major/minor1/minor2/). The “value” part of the key–value pair is simply an uninterpreted string of bytes of arbitrary length.[4]

The Unix system provides dbm (database manager), which is a 1979 library originally written by Ken Thompson. It is also ported to Microsoft Windows, provided through programming languages such as Perl for Win32. The dbm manages associative arrays of arbitrary data by use of a single key (a primary key). Modern implementations include sdbm, GNU dbm, and Berkeley DB. Although dbm precedes the concept of a NoSQL and is rarely mentioned in modern discourse, it is used by many pieces of software.

A more recent example of a key-value database is RocksDB which is used as storage engine for other database management systems such as ArangoDB. Other examples include Aerospike (database), Amazon DynamoDB, Memcached, Redis, and ScyllaDB.

See also

[edit]

References

[edit]
  1. ^ a b Corbellini, Alejandro; Mateos, Cristian; Zunino, Alejandro; Godoy, Daniela; Schiaffino, Silvia (2017-01-01). "Persisting big-data: The NoSQL landscape". Information Systems. 63: 1–23. doi:10.1016/j.is.2016.07.009. hdl:11336/58462. ISSN 0306-4379. Retrieved 2025-05-25.
  2. ^ Hecht, Robin; Jablonski, Stefan (2011). NoSQL evaluation: A use case oriented survey. 2011 International Conference on Cloud and Service Computing. pp. 336–341. doi:10.1109/CSC.2011.6138544.
  3. ^ "Storage Engines". ArangoDB. Retrieved 16 November 2020.
  4. ^ Oracle NoSQL Database.