Key Value Store

Key Value Store Definition

A key-value store, or key-value database, is a database that associates named keys to values of any type, including complex types. A key value store is useful for storing simple collections of mixed types where the data being stored would not logically contain the same columns.

Key Value Store Diagram

Key Value Store FAQs

What Are Key Value Store Use Cases?

Key Value Store use cases include any applications where the data stored is unstructured or has irregular columns. A database for items such as products or shopping carts, or session management might include values with completely different columns. In use cases such as session management, where extremely low latency is a primary consideration, but where data may be highly ephemeral an in-memory key value store might suffice.

What’s Different: Relational Database vs. Key Value Store?

NoSQL key value stores and relational database management systems (RDBMS) are architected for different uses and therefore exhibit a number of fundamental differences. Relational databases define data structures as tables with a clearly defined schema. Key value store NoSQL databases provide support for more flexible values and object structures, rather than imposing rigid schemas.

An RDBMS typically uses some implementation of Structured Query Language (SQL) for queries and changes to data, while a NoSQL key value store generally uses some other query language such as Cassandra Query Language (CQL). A relational database could be used as a transactional key value store, but unlike applications that rely on relational data, applications referencing individual records in a key value store don’t usually require the strong consistency model of a relational database, nor the capacity of doing JOINs across tables. The requisite infrastructure to support those RDBMS features therefore simply introduces overhead, resulting in higher latencies and lower throughput Whereas dedicated NoSQL Key Value Stores, designed for this purpose, offer high availability, lower latencies, and higher throughput.

What’s Different: DocumentDB vs. Key Value Store?

Key Value Stores are often confused with Document databases, because of their similarities. Like a key value store, a document database pairs a key with a value, but the document database supports complex objects. Typically there’s a structure within the document object, often JSON or XML, that follows some schema or pattern, enabling lookup within the document.

What is a Distributed Key Value Store?

A Key-Value Store implements the ability to quickly reference a complex or unstructured value associated with a particular key. While the data might have a short lifespan that favors an in-memory key value store, in other cases data is critical to preserve across any potential interruptions of service. For these, a distributed key value store allows the simple access model, along with preserving it across nodes and data centers.

What are Some Key Value Store Advantages?

A Key Value Store is simple. It doesn’t have to optimize queries with complex joins and make the trade-offs that more complex data stores have to navigate. Because it’s built to do one thing really well, a high performance key value store will run faster than more general databases. You could use almost any database as a key value store. Consider a SQL Server key value store implementation that brings all the overhead of an enterprise database installation, with a paging model that’s designed for tables with many columns, and all the background service that require a large installation footprint. You’re implementing it with a key column and a blob column. Of course it can work, but it can’t perform at the same level as a purpose-built key value store. Speed and simplicity are key advantages of key value stores.

What’s Best – Key Value Store Comparison?

The best key value store is the one that meets the needs of the application. If there are strong relationships between tables, strong consistency is essential, and latency with large datasets is no concern, a relational database is the best option. Otherwise, NoSQL options could make more sense. The Cassandra Key Value Store might be a good choice as it’s a leading distributed database with wide compatibility. For those who prefer a cloud key value data store, the DynamoDB key value store is worth a serious look. ScyllaDB is highly compatible with both Apache Cassandra and DynamoDB. ScyllaDB is a good choice for a big data key value store because it is a distributed database based on Cassandra, but written in C++ for higher performance.

Does ScyllaDB Offer Solutions for Key Value Stores?

ScyllaDB, the real-time big data database, is a multi-model distributed database that easily functions as either a high performance distributed key value store, or for more complex needs, a document database. ScyllaDB features a distributed key value data store system design built from the ground up to be always available with low latency.

ScyllaDB University Mascot

ScyllaDB University

Get started on your path to becoming a ScyllaDB expert.