Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

A worked example

Complete the statement

A company has an application that stores customer key-value data in Azure Table Storage. The company wants to move this data to Azure Cosmos DB so that it can be distributed globally and every property is indexed automatically. The application code must change as little as possible.

Complete the sentence to describe the Azure Cosmos DB API the company should use and how that API identifies each row.

The company should create an account that uses Azure Cosmos DB for . In this API, each row in a table is identified by the combination of its properties.

  • Blank 1: Table (correct answer)

    Cosmos DB for Table follows the programming model of Azure Table Storage, so the existing application can connect with only small code changes. NoSQL works with JSON documents and SQL-like queries, MongoDB works with MongoDB drivers and MQL, Apache Cassandra works with CQL, and Apache Gremlin works with graph traversals. None of these matches the Table Storage model the application already uses.

  • Blank 2: PartitionKey and RowKey (correct answer)

    In Cosmos DB for Table, a row is identified by the combination of its PartitionKey and RowKey. Timestamp and ETag are not the properties that identify a row. Name and Email are ordinary data properties, such as the columns in the sample customer table.

Why

Cosmos DB for Table keeps the Azure Table Storage programming model for key-value data held in tables, so an application already written for Table Storage can switch to it with few code changes. Compared with Table Storage, it adds global distribution and automatic indexing of every property, which are the company's goals. Each row is located by its PartitionKey and RowKey together, for example through a REST-style endpoint.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free