Microsoft Azure Data FundamentalsDescribe how to work with non-relational data on AzureMedium
A startup is building a new mobile application that needs to store semi-structured data for user profiles, product catalogs, and in-app purchases. The data schema is expected to evolve frequently, requiring flexibility. The application needs to scale globally and deliver low-latency responses. Which type of non-relational database is best suited for this evolving, semi-structured data?
- AColumn-family store
- BDocument database
- CKey-value store
- DGraph database
Show answer & explanationAnswer & explanation
Correct answer: B. Document database
Document databases are ideal for semi-structured data where the schema is flexible and can evolve over time. They store data as JSON or BSON documents, which naturally accommodate varying structures, making them perfect for user profiles and product catalogs with changing attributes.
Why the other options are wrong
- A. Column-family stores are optimized for large-scale, high-write throughput on wide rows, not primarily for flexible semi-structured documents.
- C. Key-value stores are for simple, flat data without complex structures or nested documents.
- D. Graph databases are designed for highly interconnected data and relationships, not primarily for flexible semi-structured documents.
Document Database
A type of NoSQL database that stores data in flexible, semi-structured documents (e.g., JSON, BSON), allowing for evolving schemas.
- Ideal for semi-structured data.
- Flexible schema, easy to evolve.
- Commonly used for user profiles, catalogs, content management.
Memory trick: Documents are flexible, graphs connect, keys are simple.