microsoft dp-420 practice test

designing and implementing cloud-native applications using microsoft azure cosmos db

Last exam update: Sep 01 ,2024
Page 1 out of 13. Viewing questions 1-10 out of 138

Question 1

HOTSPOT You have an Azure Cosmos DB Core (SQL) API account used by an application named App1.
You open the Insights pane for the account and see the following chart.

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Box 1: incorrect connection URLs
400 Bad Request: Returned when there is an error in the request URI, headers, or body. The response body will contain an error message explaining what the specific problem is.
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).

Box 2: 6 thousand -
201 Created: Success on PUT or POST. Object created or updated successfully.
Note:
200 OK: Success on GET, PUT, or POST. Returned for a successful response.
404 Not Found: Returned when a resource does not exist on the server. If you are managing or querying an index, check the syntax and verify the index name is specified correctly.
Reference:
https://docs.microsoft.com/en-us/rest/api/searchservice/http-status-codes

Discussions
0 / 1000

Question 2

HOTSPOT

You have an Azure Cosmos DB for NoSQL account.

You plan to create a container named container1. The container1 container will store items that include two properties named name and age.

The most commonly executed queries will query container1 for a specific name. The following is a sample of the query.



You need to define an opt-in indexing policy for container1. The solution must meet the following requirements:

Minimize the number of request units consumed by the queries.
Ensure that the _etag property is excluded from indexing.

How should you define the indexing policy? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Answer:

Discussions
0 / 1000

Question 3

HOTSPOT You need to select the capacity mode and scale configuration for account2 to support the planned changes and meet the business requirements.
What should you select? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:


Box 1: Provisioned throughput -
Provisioned throughput is best suited for workloads with sustained traffic requiring predictable performance.
Billing model: Billing is done on a per-hour basis for the RU/s provisioned, regardless of how many RUs were consumed.
Scenario: Ensure that Azure Cosmos DB costs for IoT-related processing are predictable.
Note: Azure Cosmos DB is available in two different capacity modes: provisioned throughput and serverless. You can perform the exact same database operations in both modes, but the way you get billed for these operations is radically different.
Box 2: Autoscale throughput on iotdb and throughput sharing across the containers
You can enable autoscale on a single container, or provision autoscale throughput on a database and share it among all the containers in the database.
Cost-effective: Autoscale helps optimize your RU/s usage and cost usage by scaling down when not in use. You only pay for the resources that your workloads need on a per-hour basis.
Incorrect: cannot autoscale on two containers.
Note: Autoscale provisioned throughput in Azure Cosmos DB allows you to scale the throughput (RU/s) of your database or container automatically and instantly.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/throughput-serverless https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-provision-autoscale-throughput

Discussions
0 / 1000

Question 4

You need to select the partition key for con-iot1. The solution must meet the IoT telemetry requirements.
What should you select?

  • A. the timestamp
  • B. the humidity
  • C. the temperature
  • D. the device ID
Answer:

d

User Votes:
A
50%
B
50%
C
50%
D
50%

The partition key is what will determine how data is routed in the various partitions by Cosmos DB and needs to make sense in the context of your specific scenario. The IoT Device ID is generally the natural partition key for IoT applications.
Scenario: The iotdb database will contain two containers named con-iot1 and con-iot2.
Ensure that Azure Cosmos DB costs for IoT-related processing are predictable.
Reference:
https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/iot-using-cosmos-db

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 5

You are developing an application that will use an Azure Cosmos DB Core (SQL) API account as a data source.
You need to create a report that displays the top five most ordered fruits as shown in the following table.

A collection that contains aggregated data already exists. The following is a sample document:

Which two queries can you use to retrieve data for the report? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A.

B.

C.

D.

Answer:

bd


ARRAY_CONTAINS returns a Boolean indicating whether the array contains the specified value. You can check for a partial or full match of an object by using a boolean expression within the command.
Incorrect Answers:
A: Default sorting ordering is Ascending. Must use Descending order.
C: Order on Orders not on Type.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-array-contains

Discussions
0 / 1000

Question 6

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?

  • 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

User Votes:
A
50%
B
50%
C
50%
D
50%

Store multiple entity types in the same container.

Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 7

HOTSPOT

You plan to deploy multi-master support for an Azure Cosmos DB for NoSQL account by using an Azure Resource Manager (ARM) template. The deployment will perform the following actions:

Create a database in the account.
Create a container in the database.
Configure Azure Synapse Link support the account.

You need to configure the conflictResolutionPolicy property and the analyticalStorageTtl property in the template.

Which namespace should you use for each property? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Answer:

Discussions
0 / 1000

Question 8

HOTSPOT

You have an Azure Cosmos DB for NoSQL container. The container contains items that have the following properties.



You need to protect the data stored in the container by using Always Encrypted. For each property, you must use the strongest type of encryption and ensure that queries execute properly.

What is the strongest type of encryption that you can apply to each property? To answer, select the appropriate options in the answer area.

Answer:

Discussions
0 / 1000

Question 9

HOTSPOT

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

You plan to use container1 as a key-value store that will perform point reads on the item ID and partition key.

You need to define an indexing policy for container1. The solution must meet the following requirements:

Provide the ability to set DefaultTimeToLive for container1.
Minimize implementation time.
Minimize costs.

How should you complete the JSON definition of the indexing policy? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Answer:

Discussions
0 / 1000

Question 10

HOTSPOT

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.

Answer:

Discussions
0 / 1000
To page 2