Key-Value Store
ELI5 — The Vibe Check
A key-value store is the simplest database possible. You give it a name (key) and some data (value), and it remembers it. Like a giant dictionary or a coat check. 'Here's my coat, give me ticket #47.' Later: 'Here's ticket #47, give me my coat.' That's literally it.
Real Talk
A key-value store is a NoSQL database that uses a simple associative array (hash map) as its data model. Each item is stored as a key-value pair where the key is unique and the value can be any data type. They offer O(1) lookups and are commonly used for caching, session management, and configuration storage.
Show Me The Code
// Redis-style commands
SET user:123 '{"name": "Alice"}'
GET user:123
EXPIRE user:123 3600
When You'll Hear This
"Redis is the most popular key-value store." / "We use a key-value store for session tokens and rate limiting."
Related Terms
Bloom Filter
A Bloom filter is a tiny data structure that can tell you 'definitely NOT here' or 'maybe here.
Document Store
A document store lets you throw JSON blobs into your database like tossing papers into a filing cabinet.
In-Memory Database
An in-memory database keeps everything in RAM instead of on disk, which makes it absurdly fast.
Upstash
Upstash gives you Redis and Kafka as serverless services with per-request pricing.