Microsoft Azure Data FundamentalsDescribe how to work with non-relational data on AzureMedium

A company is redesigning its online product catalog. The catalog contains millions of items, each with varying attributes (e.g., color, size, material for clothing; RAM, CPU for electronics). The application needs to query products quickly based on these flexible attributes and support frequent updates. Which Azure Cosmos DB API is most appropriate for this scenario?

  1. AAzure Cosmos DB for NoSQL (Core) API
  2. BAzure Cosmos DB for Cassandra API
  3. CAzure Cosmos DB for Gremlin (Graph) API
  4. DAzure Cosmos DB for Table API
Show answer & explanation

Correct answer: A. Azure Cosmos DB for NoSQL (Core) API

The NoSQL (Core) API is designed for document databases, which excel at storing and querying semi-structured data like product catalogs with varying attributes. Its flexible schema allows for different product types with different fields, and it provides efficient querying capabilities.

Why the other options are wrong

  • B. The Cassandra API is for column-family data and migration of Cassandra workloads, not the primary choice for new, flexible document-based product catalogs.
  • C. The Gremlin (Graph) API is for relationships, not for storing individual product items with flexible, searchable attributes.
  • D. The Table API is a key-value store, too rigid for products with 'varying attributes' and complex querying needs.

Azure Cosmos DB for NoSQL (Core) API

The Azure Cosmos DB for NoSQL (Core) API is the native API for Cosmos DB, supporting a document data model. It allows for flexible schema, rich querying with SQL-like syntax, and is ideal for JSON data.

  • Document data model, stores data as JSON documents.
  • Flexible schema, allowing varying attributes per item.
  • Rich SQL-like query language.
  • General-purpose NoSQL database for various applications.

Memory trick: Choose your Cosmos API: Document for flexible data, Graph for connections, Table for simplicity.

More Describe how to work with non-relational data on Azure questions