Microsoft DP-420 - Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Exam
Page: 2 / 30
Total 150 questions
Question #6 (Topic: Question Set 1)
You are designing an Azure Cosmos DB Core (SQL) API solution to store data from IoT devices. Writes from the devices will be occur every second.
The following is a sample of the data.

You need to select a partition key that meets the following requirements for writes:
✑ Minimizes the partition skew
✑ Avoids capacity limits
✑ Avoids hot partitions
What should you do?
The following is a sample of the data.

You need to select a partition key that meets the following requirements for writes:
✑ Minimizes the partition skew
✑ Avoids capacity limits
✑ Avoids hot partitions
What should you do?
A. Use timestamp as the partition key.
B. Create a new synthetic key that contains deviceId and sensor1Value.
C. Create a new synthetic key that contains deviceId and deviceManufacturer.
D. Create a new synthetic key that contains deviceId and a random number.
Answer: D
Question #7 (Topic: Question Set 1)
You maintain a relational database for a book publisher. The database contains the following tables.

The most common query lists the books for a given authorId.
You need to develop a non-relational data model for Azure Cosmos DB Core (SQL) API that will replace the relational database. The solution must minimize
latency and read operation costs.
What should you include in the solution?

The most common query lists the books for a given authorId.
You need to develop a non-relational data model for Azure Cosmos DB Core (SQL) API that will replace the relational database. The solution must minimize
latency and read operation costs.
What should you include in the solution?
A. Create a container for Author and a container for Book. In each Author document, embed bookId for each book by the author. In each Book document embed authorId of each author.
B. Create Author, Book, and Bookauthorlnk documents in the same container.
C. Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
D. Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.
Answer: A
Question #8 (Topic: Question Set 1)
You have an Azure Cosmos DB Core (SQL) API account.
You run the following query against a container in the account.

What is the output of the query?
You run the following query against a container in the account.

What is the output of the query?
A. [{"A": false, "B": true, "C": false}]
B. [{"A": true, "B": false, "C": true}]
C. [{"A": true, "B": true, "C": false}]
D. [{"A": true, "B": true, "C": true}]
Answer: A
Question #9 (Topic: Question Set 1)
You need to implement a trigger in Azure Cosmos DB Core (SQL) API that will run before an item is inserted into a container.
Which two actions should you perform to ensure that the trigger runs? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Which two actions should you perform to ensure that the trigger runs? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A. Append pre to the name of the JavaScript function trigger.
B. For each create request, set the access condition in RequestOptions.
C. Register the trigger as a pre-trigger.
D. For each create request, set the consistency level to session in RequestOptions.
E. For each create request, set the trigger name in RequestOptions.
Answer: C
Question #10 (Topic: Question Set 1)
HOTSPOT
You have a container in an Azure Cosmos DB Core (SQL) API account.
You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency.
What should you include in the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

You have a container in an Azure Cosmos DB Core (SQL) API account.
You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency.
What should you include in the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:
