Limited-Time Offer: Enjoy 50% Savings! Ends in 00h 00m 00s Coupon code: 50OFF
Skip to content

Free Microsoft Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB DP-420 Exam Questions

Page: 1 / 13 Total 194 questions

Want more questions? Get Premium Access.

Question 1

You plan to create an operational system that will store data in an Azure Cosmos OB 'or NoSQL account. You need to configure the account to meet the following requirements:

* Support Spar* queries.

* Support the analysis of data from the last six months.

* Only pay for analytical compute when running queries.

Which three actions should you perform? Each correct answer presents part of the solution. NOTE Each correct selection is worth one point.

Correct Answer: C. Create a container and set the analytical property to six months.; E. Create an Azure Databanks notebook.; F. Enable Azure Synapse Link for the account

Question 2

You have an Azure Cosmos DB for NoSQL account that contains a container named customers.

You have an application named App1 that caches customers and must be notified when the list of customers changes.

You implement a change feed. The Time to Live settings have the default values.

You discover the following:

* Notifications for INSERT and UPDATE operations are received within 10 seconds.

* Notifications for DELETE operations are NOT received.

Which two actions should you perform to ensure that App1 receives notifications for DELETE operations? Each correct answer present part of the solution.

NOTE: Each correct selection is worth one point.

Correct Answer: B. Use an UPDATE instead of a DELETE.; C. Add an IsDeleted flag to the items.

Question 3

You need to implement a solution to meet the product catalog requirements.

What should you do to implement the conflict resolution policy.

Correct Answer: C. Set the default consistency level for account1 to eventual.

Question 4

You plan to store order data in Azure Cosmos DB for NoSQL account. The data contains information about orders and their associated items.

You need to develop a model that supports order read operations. The solution must minimize the number or requests.

Correct Answer: B. Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents.
Explanation:

Azure Cosmos DB is a multi-model database that supports various data models, such as documents, key-value, graph, and column-family3.The core content-model of Cosmos DB's database engine is based on atom-record-sequence (ARS), which allows it to store and query different types of data in a flexible and efficient way3.

To develop a model that supports order read operations and minimizes the number of requests, you should consider the following factors:

The size and shape of your data

The frequency and complexity of your queries

The latency and throughput requirements of your application

The trade-offs between storage efficiency and query performance

Based on these factors, one possible model that you could implement isB. Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents.

This model has the following advantages:

It stores orders and order items as self-contained documents that can be easily retrieved by order ID1.

It avoids storing redundant data or creating additional containers for order items1.

It allows you to view the order history of a customer with simple queries1.

It leverages the benefits of embedding data, such as reducing the number of requests, improving query performance, and simplifying data consistency2.

This model also has some limitations, such as:

It may not be suitable for some order items that have data that is greater than 2 KB, as it could exceed the maximum document size limit of 2 MB2.

It may not be optimal for scenarios where order items need to be queried independently from orders or aggregated by other criteria2.

It may not support transactions across multiple orders or customers, as transactions are scoped to a single logical partition2.

Depending on your specific use case and requirements, you may need to adjust this model or choose a different one.For example, you could use a hybrid data model that combines embedding and referencing data2, or you could use a graph data model that expresses entities and relationships as vertices and edges.


Question 5

You have a container named container1 in an Azure Cosmos DB for NoSQL account named account1 that is set to the session default consistency level. The average size of an item in container1 is 20 KB.

You have an application named App1 that uses the Azure Cosmos DB SDK and performs a point read on the same set of items in container1 every minute.

You need to minimize the consumption of the request units (RUs) associated to the reads by App1. What should you do?

Question 6

You have an Azure Cosmos DB for NoSQL account that contains a database named DB1. Users run the following query against DB1.

You add an index to the recordset.

You need to change the ORDER by syntax of the query to optimize the use of the index. The solution must NOT change the result set.

Which syntax should you use?

Which syntax should you use?

Correct Answer: C. ORDER BY c.bikeParts ASC, c._ts ASC

Question 7

You have an Azure Cosmos DB account named accounts

You need to access account1 from an on-premises environment by using a Site-to-Site VPN. What should you use?

Correct Answer: A. a private endpoint

Question 8

You have an Azure Cosmos DB for NoSQL database named db1 that writes to multiple Azure regions. You need to test the performance of db1 in the secondary region. Which command should you run first?

Correct Answer: B. az cosmosdb failover-priority-change

Question 9

You have an Azure Cosmos DB account named account1.

You have several apps that connect to account1 by using the account's secondary key.

You then configure the apps to authenticate by using service principals.

You need to ensure that account1 will only allow apps to connect by using an Azure AD identity.

Which account property should you modify?

Question 10

You have a database in an Azure Cosmos DB for NoSQL account. The database contains a container named container1. The indexing mode container1 is set to none. You configure Azure Cognitive Search to extract data from container1 and make the data searchable. You discover that the Cognitive Search index is missing all the data from the Azure Cosmos DB index. What should you do to resolve the issue?

Correct Answer: C. Change the indexing mode of container 1 to consistent-

Question 11

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 a container named container! in an Azure Cosmos DB for NoSQL account.

You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.

Solution: You create an Azure function that uses the Azure Cosmos 08 for NoSQL change feed as a trigger and an Azure event hub as the output.

Does this meet the goal?

Correct Answer: A. Yes

Question 12

You have an Azure Cosmos DB Core (SQL) API account that uses a custom conflict resolution policy. The account has a registered merge procedure that throws a runtime exception.

The runtime exception prevents conflicts from being resolved.

You need to use an Azure function to resolve the conflicts.

What should you use?

Correct Answer: D. a function that receives items pushed from the conflicts feed and is triggered by an Azure Cosmos DB trigger
Explanation:

The Azure Cosmos DB Trigger uses the Azure Cosmos DB Change Feed to listen for inserts and updates across partitions. The change feed publishes inserts and updates, not deletions.


Question 13

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?

Correct Answer: A. Create a container for Author and a container for Book. In each Author document, embed booked for each book by the author. In each Book document embed author of each author.
Explanation:

Store multiple entity types in the same container.


Question 14

You have a container m 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 family Id

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?

Correct Answer: A. Update the document of each family member by using a transactional batch operation.

Question 15

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.

Correct Answer: C. Register the trigger as a pre-trigger.; E. For each create request, set the trigger name in RequestOptions.
Explanation:

C: When triggers are registered, you can specify the operations that it can run with.

F: When executing, pre-triggers are passed in the RequestOptions object by specifying PreTriggerInclude and then passing the name of the trigger in a List object.