Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 41–45 (page: 10)

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

You have an Azure Cosmos DB for NoSQL account named account1.
You need to create a container named Container1 in account1 by using the Azure Cosmos DB .NET SDK. The solution must ensure that the items in Container1 never expire.
What should you set?

  1. TimeToLivePropertyPath to null
  2. TimeToLivePropertyPath to 0
  3. DefaultTimeToLive to null
  4. DefaultTimeToLive to –1

Answer(s): C



View Related Case Study

You have an Azure Cosmos DB for NoSQL account named account1 that contains a database. The database hosts a container named Container1. Container1 is configured to automatically delete items 90 days after they are created.
You need to prevent the items in Container1 from being deleted automatically. The solution must be implemented by using the .NET SDK.
What should you do?

  1. Set TimeToLivePropertyPath to null.
  2. Set DefaultTimeToLive to -1.
  3. Set DefaultTimeToLive to null.
  4. Set DefaultTimeToLive to 0.

Answer(s): B

Explanation:

Set the TimeToLive property to -1 on the container configuration using the Azure Cosmos DB .NET SDK.
Setting this value to -1 explicitly overrides the default behavior, instructing the container to retain items indefinitely and preventing the automatic 90-day deletion.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/time-to-live



View Related Case Study

DRAG DROP (Drag and Drop is not supported)
You have an app that stores data in an Azure Cosmos DB for NoSQL account. The app performs queries that return large result sets.
You need to return a complete result set to the app by using pagination. Each page of results must return 80 items.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




Step 1: Configure the MaxItemCount in QueryRequestOptions
You can specify the maximum number of items returned by a query by setting the MaxItemCount. The MaxItemCount is specified per request and tells the query engine to return that number of items or fewer.
Box 2: Run the query and provide a continuation token
In the .NET SDK and Java SDK you can optionally use continuation tokens as a bookmark for your query's progress. Azure Cosmos DB query executions are stateless at the server side and can be resumed at any time using the continuation token.
If the query returns a continuation token, then there are additional query results.
Step 3: Append the results to a variable


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-pagination



View Related Case Study

You have an Azure subscription. The subscription contains an Azure Cosmos DB for NoSQL account named account1 that uses a default consistency level of Consistent Prefix.
You execute a SELECT query and specify the Consistent Prefix consistency level.
You need to execute a second SELECT query during the same session and specify a lower consistency level.
Which consistency level can be used for the second SELECT query?

  1. Session
  2. Strong
  3. Bounded Staleness
  4. Eventual

Answer(s): D

Explanation:

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



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You have an Azure Cosmos DB for NoSQL container named Contacts that is configured as shown in the following exhibit.

Contacts contains the items shown in the following table.

To Contacts, you plan to Insert the items shown in the following table.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: Yes
Existing "Terry John" is not the same as Item1's "terry john"
Box 2: No
Item2 "Rogers" "null" already exists.
Note: Sparse unique keys are not supported. If some unique path values are missing, they're treated as null values, which take part in the uniqueness constraint. For this reason, there can be only a single item with a null value to satisfy this constraint.
Box 3: Yes
As companyID for Item3 is 2, and not 1, this is fine.
Note: Unique key constraints in Azure Cosmos DB
Unique keys add a layer of data integrity to an Azure Cosmos DB container. You create a unique key policy when you create an Azure Cosmos DB container. With unique keys, you make sure that one or more values within a logical partition is unique. You also can guarantee uniqueness per partition key.
After you create a container with a unique key policy, the creation of a new or an update of an existing item resulting in a duplicate within a logical partition is prevented, as specified by the unique key constraint. The partition key combined with the unique key guarantees the uniqueness of an item within the scope of the container.
For example, consider an Azure Cosmos DB container with Email address as the unique key constraint and CompanyID as the partition key.
When you configure the user's email address with a unique key, each item has a unique email address within a given CompanyID. Two items can't be created with duplicate email addresses and with the same partition key value. In Azure Cosmos DB's API for NoSQL, items are stored as JSON values. These JSON values are case sensitive.
When you choose a property as a unique key, you can insert case sensitive values for that property. For example, if you have a unique key defined on the name property, "Gaby" is different from "gaby" and you can insert both into the container.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/unique-keys



Viewing page 10 of 61
Viewing questions 46 - 50 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!