Microsoft Azure Data FundamentalsDescribe core data conceptsMedium
A marketing department wants to store customer feedback, which often consists of free-form text, survey responses with varying question sets, and sometimes attached images. They need a database that can handle this diverse and evolving structure without requiring a rigid schema definition upfront. Which data model is BEST suited for representing this type of data?
- ADocument Model
- BGraph Model
- CKey-Value Model
- DRelational Model
Show answer & explanationAnswer & explanation
Correct answer: A. Document Model
The document model, commonly implemented in NoSQL databases, is ideal for storing semi-structured data like customer feedback. It allows each record (document) to have a flexible and evolving schema, accommodating free-form text, varied survey responses, and references to attached images without rigid upfront definitions.
Why the other options are wrong
- B. Graph models are for representing relationships between entities, not primarily for storing diverse, evolving records.
- C. Key-value models are too simple for complex, nested data structures like survey responses with varying fields.
- D. Relational models require a fixed schema, which is unsuitable for varying and evolving data structures.
Document Data Model
The document data model stores data in flexible, semi-structured documents, typically in formats like JSON or BSON. Each document can have a different structure.
- Flexible schema (schema-on-read).
- Ideal for semi-structured data.
- Supports nested data structures.
- Commonly used in NoSQL databases like MongoDB or Azure Cosmos DB (Document API).
Memory trick: Documents are like flexible 'papers' for your data.