# Key-Value Store

> The simplest NoSQL database. You save a value under a key and read it back.

**Field:** Software Development  
**Category:** Databases  
**Also known as:** Key-Value Database, KV Store

## Think of it like

Think of it like a wall of lockers. Each one has a number, and you open it to get what is inside.

## Definition

A key-value store is the simplest kind of NoSQL database. It saves each value under a unique key, like a name tag, and gets it back by that key. It does not look inside the value, so it cannot search by what the value holds. That makes it very fast for simple saves and reads. It is often used for caches, sessions and counters.

## Example

Emma's site keeps each logged-in user's session in a key-value store. The key is the session id, and the value is who they are.

## Why it matters

When you only ever look things up by one key, nothing is faster or simpler.

## Common mistake

Trying to search by what the values contain. A key-value store only finds things by their key.

## Three principles

- **Key in, value out.** One lookup, one answer.
- **Very fast.** No searching inside values.
- **Caches and sessions.** Its most common jobs.

## Related terms

- [NoSQL Database](https://learn.benibix.com/term/development/nosql-database)
- [Redis](https://learn.benibix.com/term/development/redis)
- [Dictionary](https://learn.benibix.com/term/development/dictionary)
- [Document Database](https://learn.benibix.com/term/development/document-database)

## Told apart from

- [Document Database vs Key-Value Store](https://learn.benibix.com/compare/document-database-vs-key-value-store): People think Redis and MongoDB are the same kind of NoSQL, and they are not. A key-value store keeps one value under each name and finds it only by that name, very fast. A document database keeps whole records, each a JSON-like document, and can search inside them. Redis is often a quick cache. MongoDB is often the main store.

---

Source: https://learn.benibix.com/term/development/key-value-store
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
