Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 61–65 (page: 14)

Updated On: 16-Nov-2026
View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You have an Azure Cosmos DB account named account1 that has a default consistency level of session.
You have an app named App1.
You need to ensure that the read operations of App1 can request either bounded staleness or consistent prefix consistency.
What should you modify for each consistency level? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: The database level options
Strengthened. From the weaker Session to the stronger Bounded staleness.
To move from weaker to stronger consistency, update the default consistency for the Azure Cosmos DB account.
Note: Override the default consistency level
Clients can override the default consistency level that is set by the service. Consistency level can be set on a per request, which overrides the default consistency level set at the account level.
Box 2: The request level options.
Relaxed. From the stronger Session to the weaker Consistent prefix.
Consistency can only be relaxed at the SDK instance or request level.
Note: Azure Cosmos DB offers five well-defined levels. From strongest to weakest, the levels are:
Strong
Bounded staleness
Session
Consistent prefix
Eventual


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/how-to-manage-consistency



View Related Case Study

You are designing an Azure Cosmos DB for NoSQL data model that will contain authors, books the authors have written, and reviews of the books.
You need to maintain referential integrity between entities by using server-side transactional support.
What is the largest scope of the transactions you can use?

  1. items in the same container
  2. a single item
  3. items in the same database
  4. items in the same logical partition

Answer(s): A

Explanation:

Transactional batch operations in Azure Cosmos DB
Transactional batch describes a group of point operations that need to either succeed or fail together with the same partition key in a container. Operations are defined, added to the batch, and the batch is executed. If all operations succeed in the order they're described within the transactional batch operation, the transaction will be committed. However, if any operation fails, the entire transaction is rolled back.
Does Azure Cosmos DB for NoSQL support ACID (atomicity, consistency, isolation, durability) transactions? Yes, the API for NoSQL supports cross-document transactions expressed using either batches in the SDKs or as JavaScript-stored procedures and triggers. Transactions are scoped to a single partition within each container and executed with ACID semantics as "all or nothing," isolated from other concurrently executing code and user requests. If exceptions occur, the entire transaction is rolled back.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/transactional-batch https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/faq



View Related Case Study

You are designing an Azure Cosmos DB for NoSQL solution to store data from IoT devices. Writes from the devices will occur every second. Data will be retained indefinitely.
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?

  1. Use deviceId as the partition key.
  2. Create a new synthetic key that contains deviceId and timestamp.
  3. Use sensor1value as the partition key.
  4. Create a new synthetic key that contains deviceId and sensor1Value.

Answer(s): B

Explanation:

Correct:
* Create a new synthetic key that contains deviceId and a random number.
Use a partition key with a random suffix. Distribute the workload more evenly is to append a random number at the end of the partition key value.
When you distribute items in this way, you can perform parallel write operations across partitions.
* Create a new synthetic key that contains deviceId and timestamp.
Concatenate multiple properties of an item.
You can form a partition key by concatenating multiple property values into a single artificial partitionKey property. These keys are referred to as synthetic keys.
For example, consider the following example document:
{
"deviceId": "abc-123",
"date": 2018
}
For the previous document, one option is to set /deviceId or /date as the partition key. Use this option, if you want to partition your container based on either device ID or date. Another option is to concatenate these two values into a synthetic partitionKey property that's used as the partition key.
{
"deviceId": "abc-123",
"date": 2018,
"partitionKey": "abc-123-2018"
Incorrect:
* Create a new synthetic key that contains deviceId and deviceManufacturer.
All the devices could have the same manufacturer.
* Create a new synthetic key that contains deviceId and sensor1Value.
Senser1Value has only two values.
* Use deviceId as the partition key.
* Use deviceManufacturer as the partition key.
All the devices could have the same manufacturer.
* Use sensor1Value as the partition key
* Use timestamp as the partition key.
You will also not like to partition the data on “DateTime”, because this will create a hot partition. Imagine you have partitioned the data on time, then for a given minute, all the calls will hit one partition. If you need to retrieve the data for a customer, then it will be a fan-out query because data may be distributed on all the partitions.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/synthetic-partition-keys https://docs.microsoft.com/en-us/azure/cosmos-db/concepts-limits



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1. The items in Container1 are stored in the following format.

You need to write a query to return the Given and Family names of the children in Family1.
How should you complete the code? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: parents
Match the childrens (c) givenName and familyName with the parents corresponding properties.
Box 2: f.id
Family1 is the id at root level.
f is at root level.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/join



View Related Case Study

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Cosmos DB for NoSQL account named account1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure Azure Event Grid to send events to the function by using an Event Grid trigger in the function.
Does this meet the goal?

  1. Yes
  2. No

Answer(s): B

Explanation:

Instead configure an Azure Monitor alert to trigger the function.
You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts



Viewing page 14 of 61
Viewing questions 66 - 70 out of 296 questions


Post your Comments and Discuss Microsoft DP-420 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!