Microsoft Azure Data FundamentalsDescribe core data conceptsMedium
A data architect is designing a system to manage user preferences and session data for a popular mobile application. This data consists of simple key-value pairs (e.g., `user_id: '123'`, `last_login: '2024-01-15'`). The system requires extremely fast read and write operations, high scalability to handle millions of users, and does not require complex queries or relationships between data entities. Which type of database is MOST suitable for this scenario?
- ADocument Database
- BRelational Database
- CKey-Value Database
- DGraph Database
Show answer & explanationAnswer & explanation
Correct answer: C. Key-Value Database
Key-Value databases are optimized for simple, direct storage and retrieval of data based on a unique key, providing extremely fast read/write operations and high scalability for use cases like user preferences and session data.
Why the other options are wrong
- A. Document databases offer schema flexibility but are more complex than needed for simple key-value pairs.
- B. Relational databases are overkill for simple key-value data and introduce unnecessary overhead for this use case.
- D. Graph databases are for managing complex relationships, which are explicitly not required here.
Key-Value Database
A simple NoSQL database that stores data as a collection of key-value pairs, where each key is unique.
- Optimized for high-speed read and write access.
- Highly scalable horizontally, making it suitable for massive datasets.
- Best for simple data retrieval based on a unique identifier, without complex querying.
Memory trick: Key-Value for Quick Access, No Complex Queries