.NET Architecture & System Design Interview Question #67
What is a key-value database?
Database Scaling, Partitioning, NoSQL & Data Consistency Mid-Level Intermediate
Quick Interview Answer
A key-value database stores values that are retrieved primarily through a unique key. This simple access model can provide very high performance and horizontal scalability.
Detailed Explanation
A key-value database stores values that are retrieved primarily through a unique key. This simple access model can provide very high performance and horizontal scalability.
It is useful for caches, sessions, counters, feature state, or data naturally addressed by key. It is less suitable when the application requires rich relational queries across many attributes unless the selected product provides additional indexing capabilities.
Code Example
Key Value
"user:42:session" -> {...}
"product:100" -> {...}
"counter:views" -> 182034