Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 51–55 (page: 12)

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

You have an Azure Cosmos DB for NoSQL account.
You run the following query against a container in the account.

What is the output of the query?

  1. [{"A": false, "B": true, "C": false}]
  2. [{"A": true, "B": false, "C": true}]
  3. [{"A": true, "B": true, "C": false}]
  4. [{"A": true, "B": true, "C": true}]

Answer(s): A

Explanation:

IS_NUMBER returns a Boolean value indicating if the type of the specified expression is a number. "1234" is a string, not a number.


Reference:

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



View Related Case Study

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

You need to query name, sizeInGb, and currentStockLevel for items that have a value of currentStockLevel that is greater than 100.
How should you complete the query? 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:




Self-joins in Azure Cosmos DB for NoSQL
In Azure Cosmos DB for NoSQL, data is schema-free and typically denormalized. Instead of joining data across entities and sets, like you would in a relational database, joins occur within a single item. Specifically, joins are scoped to that item and can't occur across multiple items and containers.
Box 1: JOIN
In a traditional relational database, the tags would be separated into a separate table and a cross-table join is performed with a filter applied to the results. In the API for NoSQL, we can perform a self-join operation within the item using the JOIN keyword.
Box 2: IN
Example:
SELECT p.sku, t.name AS tag
FROM
products p
JOIN
t IN p.tags
WHERE p.categoryName = "Sleeping Bags" AND t.slug = "bag-shape-mummy"


Reference:

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



View Related Case Study

You have a container in an Azure Cosmos DB for NoSQL account. The container stores data about families. Data about parents, children, and pets are stored as separate documents.
Each document contains the address of each family. Members of the same family share the same partition key named familyId.
You need to update the address for each member of the same family that share the same address. The solution must meet the following requirements:
-Be atomic, consistent, isolated, and durable (ACID).
-Provide the lowest latency.
What should you do?

  1. Update the document of each family member separately by using a patch operation
  2. Update the document of each family member separately and set the consistency level to strong
  3. Update the document of each family member by using a transactional batch operation

Answer(s): C

Explanation:

Each transaction provides ACID (Atomicity, Consistency, Isolation, Durability) property guarantees. Transactional batch operations offer reduced latency on equivalent operations.
Note: Transactional batch describes a group of point operations that need to either succeed or fail together with the same partition key in a container. In the .NET SDK, the TransactionalBatch class is used to define this batch of operations. If all operations succeed in the order they are described within the transactional batch operation, the transaction will be committed. However, if any operation fails, the entire transaction is rolled back.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/transactional-batch



View Related Case Study

You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1.
The DefaultTimeToLive property of Container1 is set to 500.
Container1 contains an item that has a ttl property of 1000.
The item in Container1 is modified.
When will the item be deleted automatically?

  1. in 1,000 hours
  2. in 500 hours
  3. in 1,000 seconds
  4. in 500 seconds

Answer(s): C

Explanation:

The item will be automatically deleted 1,000 seconds after its last modification time.
How Time to Live (TTL) Evaluation Works
Item-Level Override: In Azure Cosmos DB, when a container has a valid DefaultTimeToLive configured (in this case, 1000 seconds), any individual item can override this value by declaring its own ttl property. Because the item's ttl is explicitly set to 1000, the container's default of 500 is completely ignored for this specific item.
Resetting the Clock: TTL expiration calculations are tied directly to the item's system-generated _ts (timestamp) property, which records the last modified time. Every time an item is created or updated, Azure Cosmos DB updates _ts to the current Unix epoch time.
Consequently, modifying the item resets its lifespan, and the system will automatically purge it exactly §,000 seconds after that modification occurred.


Reference:

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



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You plan to create an Azure Cosmos DB for NoSQL container that will contain items in the following format.

You need to define a query that will return the userid values of all the users who purchased an item that has a sku value of 11111.
How should you compete the query? 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: n in c.items
Define n as c.items
Example of subquery with the EXISTS predicate:
SELECT p.name, p.tags
FROM
products p
WHERE
EXISTS (SELECT VALUE t FROM t IN p.tags WHERE t = "outerwear")
Box 2: n.sku
The sku is defined within the items construct.
Note: Subqueries in Azure Cosmos DB for NoSQL
A subquery is a query nested within another query within Azure Cosmos DB for NoSQL. A subquery is also called an inner query or inner SELECT. The statement that contains a subquery is typically called an outer query.


Reference:

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



Viewing page 12 of 61
Viewing questions 56 - 60 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!