A social media company stores user posts as JSON documents in Azure Cosmos DB. Each post may have a different number of fields and nested objects. Which type of data model does this represent?
A document database, such as Azure Cosmos DB, stores each social media post as an independent JSON document and can index individual fields and nested properties for queries. The schema is flexible, so different posts can contain different fields without migrations, matching the naturally evolving JSON structure of user-generated content. This native JSON support with dot-notation field access and rich indexing is exactly why this scenario points to a document data store.
Why this answer
The scenario describes user posts stored as JSON documents with varying fields and nested objects. Azure Cosmos DB's Document data model (using the SQL API or MongoDB API) is designed for semi-structured, schema-agnostic data where each document can have a different structure, making it the correct choice.
Exam trap
The trap here is that candidates may confuse the document model with key-value because both handle unstructured data, but key-value stores lack the ability to query on nested fields or perform rich queries like those supported by Cosmos DB's SQL API.
How to eliminate wrong answers
Option A is wrong because a key-value data model stores data as simple key-value pairs without support for nested objects or querying on fields within the value. Option B is wrong because a column-family data model organizes data into rows and column families, requiring a predefined schema for columns, not flexible JSON documents. Option D is wrong because a graph data model is optimized for relationships between entities using nodes and edges, not for storing semi-structured documents with varying fields.