December 30, 2024

Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB

If you can get 700 points or above, you can get DP-420 certification, Exam DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB (beta)
It is a new test item added in 2021-2022. Participating in the DP-420 exam plan will help you pass the test easily:

dp-420 exam plan

What is the DP-420 Exam Program?

The first step is to take the DP-420 online exam test to improve your skills and verify your exam strength.

Step 2 Download leads4pass DP-420 dumps: https://www.leads4pass.com/dp-420.html (PDF+VCE), get complete exam questions to help you pass the exam 100%

Let’s follow the steps to complete the DP-420 exam plan:

DP-420 Online Exam Test:

Note: Answers are announced at the end of the article

2022 DP-420 [Q1]:

HOTSPOT
You have an Azure Cosmos DB Core (SQL) API account named account1.
You have the Azure virtual networks and subnets shown in the following table.

dp-420 q1

The vnet1 and vnet2 networks are connected by using a virtual network peer.
The Firewall and virtual network settings for account1 are configured as shown in the exhibit.

dp-420 q1-1

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:

dp-420 q1-2

Correct Answer:

dp-420 q1-3

Box 1: Yes
VM1 is on vnet1.subnet1 which has the Endpoint Status enabled.
Box 2: No
Only virtual network and their subnets added to Azure Cosmos account have access. Their peered VNets cannot
access the account until the subnets within peered virtual networks are added to the account.
Box 3: No
Only virtual network and their subnets added to Azure Cosmos account have access.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-vnet-service-endpoint

2022 DP-420 [Q2]:

HOTSPOT
You have a container named container1 in an Azure Cosmos DB Core (SQL) API account.
The following is a sample of a document in container1.
{
“studentId”: “631282”,
“firstName”: “James”,
“lastName”: “Smith”,
“enrollmentYear”: 1990,
“isActivelyEnrolled”: true,
“address”: {
“street”: “”,
“city”: “”,
“stateProvince”: “”,
“postal”: “”,
}
}
The container1 container has the following indexing policy.
{
“indexingMode”: “consistent”,
“includePaths”: [
{
“path”: “/*”
},
{
“path”: “/address/city/?”
}
],
“excludePaths”: [
{
“path”: “/address/*”
},
{
“path”: “/firstName/?”
}
]
}
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:

dp-420 q2

Correct Answer:

dp-420 q2-1

Box 1: Yes
“path”: “/*” is in includePaths.
Include the root path to selectively exclude paths that don\\’t need to be indexed. This is the recommended approach as
it lets Azure Cosmos DB proactively index any new property that may be added to your model.
Box 2: No
“path”: “/firstName/?” is in excludePaths.
Box 3: Yes
“path”: “/address/city/?” is in includePaths
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/index-policy

2022 DP-420 [Q3]:

HOTSPOT
You have the indexing policy shown in the following exhibit.

dp-420 q3

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:

dp-420 q3-1

Correct Answer:

dp-420 q3-2

Box 1: ORDER BY c.name DESC, c.age DESC
Queries that have an ORDER BY clause with two or more properties require a composite index.
The following considerations are used when using composite indexes for queries with an ORDER BY clause with two or
more properties:

1. If the composite index paths do not match the sequence of the properties in the ORDER BY clause, then the composite index can\\’t support the query.

2. The order of composite index paths (ascending or descending) should also match the order in the ORDER BY clause.

3. The composite index also supports an ORDER BY clause with the opposite order on all paths.

Box 2: At the same time as the item creation Azure Cosmos DB supports two indexing modes:

1. Consistent: The index is updated synchronously as you create, update or delete items. This means that the consistency of your read queries will be the consistency configured for the account.

2. None: Indexing is disabled on the container.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/index-policy

2022 DP-420 [Q4]:

You have an Azure Cosmos DB Core (SQL) API account.
You configure the diagnostic settings to send all log information to a Log Analytics workspace.
You need to identify when the provisioned request units per second (RU/s) for resources within the account were modified.
You write the following query.
AzureDiagnostics
| where Category == “ControlPlaneRequests”
What should you include in the query?

A. | where OperationName startswith “AccountUpdateStart”
B. | where OperationName startswith “SqlContainersDelete”
C. | where OperationName startswith “MongoCollectionsThroughputUpdate”
D. | where OperationName startswith “SqlContainersThroughputUpdate”

The following are the operation names in diagnostic logs for different operations:

1. RegionAddStart, RegionAddComplete
2. RegionRemoveStart, RegionRemoveComplete
3. AccountDeleteStart, AccountDeleteComplete
4. RegionFailoverStart, RegionFailoverComplete
5. AccountCreateStart, AccountCreateComplete
6. *AccountUpdateStart*, AccountUpdateComplete
7. VirtualNetworkDeleteStart, VirtualNetworkDeleteComplete
8. DiagnosticLogUpdateStart, DiagnosticLogUpdateComplete

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/audit-control-plane-logs

2022 DP-420 [Q5]:

HOTSPOT
You have a database named telemetry in an Azure Cosmos DB Core (SQL) API account that stores IoT data. The database contains two containers named readings and devices.
Documents in readings have the following structure.

1. id
2. deviceid
3. timestamp
4. ownerid
5. measures (array)

-type
-value
-metricid

Documents in devices have the following structure.
id deviceid owner

– ownerid
-emailaddress
-name brand model

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:

dp-420 q5

Correct Answer:

dp-420 q5-1

Box 1: Yes
Need to join readings and devices.

Box 2: No
Only readings is required. All required fields are in readings.

Box 3: No
Only devices is required. All required fields are in devices.

2022 DP-420 [Q6]:

HOTSPOT
You have an Azure Cosmos DB Core (SQL) API account named account1.
In account1, you run the following query in a container that contains 100GB of data.
SELECT *
FROM c
WHERE LOWER(c.categoryid) = “hockey”
You view the following metrics while performing the query.

dp-420 q6

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:

dp-420 q6-1

Correct Answer:

dp-420 q6-2

Box 1: No
Each physical partition should have its own index, but since no index is used, the query is not cross-partition.

Box 2: No
Index utilization is 0% and Index Look up time is also zero.

Box 3: Yes
A partition key index will be created, and the query will perform across the partitions.

Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-query-container

2022 DP-420 [Q7]:

You have an Azure Cosmos DB Core (SQL) API account.
You run the following query against a container in the account.
SELECT
IS_NUMBER(“1234”) AS A,
IS_NUMBER({prop: 1234}) AS C
What is the output of the query?

A. [{“A”: false, “B”: true, “C”: false}]
B. [{“A”: true, “B”: false, “C”: true}]
C. [{“A”: true, “B”: true, “C”: false}]
D. [{“A”: true, “B”: true, “C”: true}]

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

2022 DP-420 [Q8]:

You maintain a relational database for a book publisher. The database contains the following tables.

dp-420 q8

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 authorIdof 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.
Store multiple entity types in the same container.

2022 DP-420 [Q9]:

You are designing an Azure Cosmos DB Core (SQL) API solution to store data from IoT devices. Writes from the devices will be occur every second. The following is a sample of the data.

dp-420 q9

You need to select a partition key that meets the following requirements for writes:

1. Minimizes the partition skew
2. Avoids capacity limits
3. Avoids hot partitions What should you do?

A. Use timestampas the partition key.
B. Create a new synthetic key that contains deviceIdand sensor1Value.
C. Create a new synthetic key that contains deviceIdand deviceManufacturer.
D. Create a new synthetic key that contains deviceIdand 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.
Incorrect Answers:

A: 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.

B: Senser1Value has only two values.

C: All the devices could have the same manufacturer.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/synthetic-partition-keys

2022 DP-420 [Q10]:

HOTSPOT
You have an Azure Cosmos DB Core (SQL) API account named storage1 that uses provisioned throughput capacity mode.
The storage1 account contains the databases shown in the following table.

dp-420 q10

The databases contain the containers shown in the following table.

dp-420 q10-1

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:

dp-420 q10-2

Correct Answer:

dp-420 q10-3

Box 1: No
Four containers with 1000 RU/s each.

Box 2: No
Max 8000 RU/s for db2. 8 containers, so 1000 RU/s for each container.

Box 3: Yes
Max 8000 RU/s for db2. 8 containers, so 1000 RU/s for each container. Can very well add an additional container.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/plan-manage-costs
https://azure.microsoft.com/en-us/pricing/details/cosmos-db/

2022 DP-420 [Q11]:

You have a database in an Azure Cosmos DB Core (SQL) API account.
You need to create an Azure function that will access the database to retrieve records based on a variable named accountnumber. The solution must protect against SQL injection attacks.
How should you define the command statement in the function?

A. cmd = “SELECT * FROM Persons pWHERE p.accountnumber = \\’accountnumber\\'”
B. cmd = “SELECT * FROM Persons pWHERE p.accountnumber = LIKE @accountnumber”
C. cmd = “SELECT * FROM Persons pWHERE p.accountnumber = @accountnumber”
D. cmd = “SELECT * FROM Persons pWHERE p.accountnumber = \\'” + accountnumber + “\\'”

Azure Cosmos DB supports queries with parameters expressed by the familiar @ notation. Parameterized SQL provides robust handling and escaping of user input, and prevents accidental exposure of data through SQL injection.
For example, you can write a query that takes lastName and address.state as parameters, and execute it for various values of lastName and address.state based on user input.
SELECT *
FROM Families f
WHERE f.lastName = @lastName AND f.address.state = @addressState
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-parameterized-queries

2022 DP-420 [Q12]:

HOTSPOT
You have an Azure Cosmos DB Core (SQL) account that has a single write region in West Europe.
You run the following Azure CLI script.

dp-420 q12

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:

dp-420 q12-1

Correct Answer:

dp-420 q12-2

Box 1: Yes
The Automatic failover option allows Azure Cosmos DB to failover to the region with the highest failover priority with no user action should a region become unavailable.

Box 2: No
West Europe is used for failover. Only North Europe is writable.
To Configure multi-region set UseMultipleWriteLocations to true.

Box 3: Yes
Provisioned throughput with single write region costs $0.008/hour per 100 RU/s and provisioned throughput with multiple writable regions costs $0.016/per hour per 100 RU/s.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-multi-master https://docs.microsoft.com/enus/azure/cosmos-db/optimize-cost-regions

Publish the answer:

Q1Q2Q3Q4Q5Q6Q7Q8Q9Q10Q11Q12
IMAGEIMAGEIMAGEAIMAGEIMAGEAADIMAGECIMAGE

More learning methods (PDF, Youtube):

500-220 Youtube

DP-420 Exam Questions Youtube:

500-220 pdf

DP-420 Exam Questions Youtube:

Download the free DP-420 exam PDF: https://drive.google.com/file/d/1ZQKrYiGhGlUyQJFZm-RKifvE9c9NnQTI/view?usp=sharing

We share 12 newly updated DP-420 exam questions for free, making and sharing is not easy, so if you want to get the full exam questions please download the leads4pass DP-420 dumps https://www.leads4pass.com/dp-420.html (Total Questions: 51 Q&A).
All exam questions are updated throughout the year, real and effective, and 100% pass the exam is guaranteed.