[Mar-2025] The Best Azure Cosmos DB Developer Specialty Study Guide for the DP-420 Exam
DP-420 certification guide Q&A from Training Expert VerifiedDumps
Microsoft DP-420 exam covers a wide range of topics related to cloud-native application development using Azure Cosmos DB. These topics include designing and implementing Cosmos DB databases, developing Cosmos DB solutions using various APIs and programming languages, designing and implementing data partitioning strategies, and optimizing Cosmos DB performance and scalability. Passing DP-420 exam demonstrates your expertise in cloud-native application development using Azure Cosmos DB, making you an invaluable asset to any organization that uses Azure for their cloud-based data management needs.
NEW QUESTION # 58
You have the Azure Cosmos DB for NoSQL containers shown in the following table.
You have the items shown in the following table.
When will each item expire? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation
NEW QUESTION # 59
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?
- A. In account1, provision a dedicated gateway and integrated cache
- B. In App1, change the consistency level of read requests to consistent prefix.
- C. In account1, change the default consistency level to bounded staleness.
- D. In App1, modify the connection policy settings.
Answer: B
Explanation:
Explanation
The cost of a point read for a 1 KB item is 1 RU. The cost of other operations depends on factors such as item size, indexing policy, consistency level, and query complexity . To minimize the consumption of RUs, you can optimize these factors according to your application needs.
For your scenario, one possible way to minimize the consumption of RUs associated to the reads by App1 is to change the consistency level of read requests to consistent prefix. Consistent prefix is a lower consistency level than session, which is the default consistency level for Azure Cosmos DB. Lower consistency levels consume fewer RUs than higher consistency levels . Consistent prefix guarantees that reads never see out-of-order writes and that monotonic reads are preserved . This may be suitable for your application if you can tolerate some eventual consistency.
NEW QUESTION # 60
You have a database named telemetry in an Azure Cosmos DB Core (SQL) API account that stores IoT dat a. The database contains two containers named readings and devices.
Documents in readings have the following structure.
id
deviceid
timestamp
ownerid
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.
Answer:
Explanation:
NEW QUESTION # 61
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.
The databases contain the containers 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.
Answer:
Explanation:
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/plan-manage-costs
https://azure.microsoft.com/en-us/pricing/details/cosmos-db/
NEW QUESTION # 62
You have an Azure Cosmos DB Core (SQL) API account that is configured for multi-region writes. The account contains a database that has two containers named container1 and container2.
The following is a sample of a document in container1:
{
"customerId": 1234,
"firstName": "John",
"lastName": "Smith",
"policyYear": 2021
}
The following is a sample of a document in container2:
{
"gpsId": 1234,
"latitude": 38.8951,
"longitude": -77.0364
}
You need to configure conflict resolution to meet the following requirements:
For container1 you must resolve conflicts by using the highest value for policyYear.
For container2 you must resolve conflicts by accepting the distance closest to latitude: 40.730610 and longitude: -73.935242.
Administrative effort must be minimized to implement the solution.
What should you configure for each container? To answer, drag the appropriate configurations to the correct containers. Each configuration may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/conflict-resolution-policies
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-manage-conflicts
NEW QUESTION # 63
You have a database in an Azure Cosmos DB Core (SQL) API account.
You plan to create a container that will store employee data for 5,000 small businesses. Each business will have up to 25 employees. Each employee item will have an emailAddress value.
You need to ensure that the emailAddress value for each employee within the same company is unique.
To what should you set the partition key and the unique key? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation:
Box 1: CompanyID
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 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.
Box 2: emailAddress
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/unique-keys
NEW QUESTION # 64
You plan to implement con-iot1 and con-iot2.
You need to configure the default Time to Live setting for each container. The solution must meet the loT telemetry requirements.
What should you configure? To answer, select the appropriate options in the answer NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation
Box 1 = On (no default)For con-iot1, you need to configure the default TTL setting to On (no default), which means that items in this container do not expire by default, but you can override the TTL value on a per-item basis. This meets the requirement of retaining all telemetry data unless overridden1.
Box 2 = On (3600 seconds)For con-iot2, you need to configure the default TTL setting to On (3600 seconds), which means that items in this container will expire 3600 seconds (one hour) after their last modified time. This meets the requirement of deleting all telemetry data older than one hour1.
NEW QUESTION # 65
You have a container that stores data about families. The following is a sample document.
For each of the following statements, select Yes if the statement is true. otherwise, select No.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation
Children who do no have parents defined will appear on the list = NO
Children who do not have parents defined will not appear on the list. This is because the document schema defines the children property as an array of objects that contain the firstName and gender properties of each child, as well as a parents property that references the id values of the parents. If a child does not have parents defined, it means that the parents property is either missing or empty for that child. Therefore, such a child will not be included in the list of children who have parents defined.
Children who have more than one pet will appear on the list multiple times. = Yes Children who have more than one pet will appear on the list multiple times. This is because the document schema defines the pets property as an array of objects that contain the givenName and type properties of each pet, as well as a children property that references the id values of the children who own the pet. If a child has more than one pet, it means that the child's id value will appear in the children property of multiple pet objects. Therefore, such a child will be included in the list of children who have pets multiple times.
Children who do no have pets defined will appear on the list = No
Children who do not have pets defined will not appear on the list. This is because the document schema defines the pets property as an array of objects that contain the givenName and type properties of each pet, as well as a children property that references the id values of the children who own the pet. If a child does not have pets defined, it means that the child's id value does not appear in the children property of any pet object.
Therefore, such a child will not be included in the list of children who have pets defined.
NEW QUESTION # 66
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.
Answer:
Explanation:
NEW QUESTION # 67
You have a database in an Azure Cosmos DB SQL API Core (SQL) account that is used for development.
The database is modified once per day in a batch process.
You need to ensure that you can restore the database if the last batch process fails. The solution must minimize costs.
How should you configure the backup settings? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
NEW QUESTION # 68
You have a database in an Azure Cosmos DB for NoSQL account that is configured for multi-region writes.
You need to use the Azure Cosmos DB SDK to implement the conflict resolution policy for a container. The solution must ensure that any conflict sent to the conflict feed.
Solution: You set ConfilictResolutionMode to Custom. You Set ResolutionProcedures to a custom stored procedure. You configure the custom stored procedure to use the conflictingItems parameter to resolve conflict.
Does this meet the goal?
- A. Yes
- B. No
Answer: A
Explanation:
Setting ConflictResolutionMode to Custom and configuring a custom stored procedure with the
"conflictingItems" parameter will allow you to implement a custom conflict resolution policy. This will ensure that any conflicts are sent to the conflict feed for resolution.
NEW QUESTION # 69
You have an Azure Cosmos DB for NoSQL account named accounts1.
You plan to implement the integrated cache for account1.
You need to configure the connectivity mode and the consistency level for requests that target account1. The solution must maximize consistency while using the integrated cache.
What should you configure? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation:
NEW QUESTION # 70
You have a database named db1 in an Azure Cosmos DB for NoSQL
You are designing an application that will use dbl.
In db1, you are creating a new container named coll1 that will store in coll1.
The following is a sample of a document that will be stored in coll1.
The application will have the following characteristics:
* New orders will be created frequently by different customers.
* Customers will often view their past order history.
You need to select the partition key value for coll1 to support the application. The solution must minimize costs.
To what should you set the partition key?
- A. id
- B. orderId
- C. orderDate
- D. customerId
Answer: D
Explanation:
Explanation
Based on the characteristics of the application and the provided document structure, the most suitable partition key value for coll1 in the given scenario would be the customerId, Option B.
The application frequently creates new orders by different customers and customers often view their past order history. Using customerId as the partition key would ensure that all orders associated with a particular customer are stored in the same partition. This enables efficient querying of past order history for a specific customer and reduces cross-partition queries, resulting in lower costs and improved performance.
a partition key is a JSON property (or path) within your documents that is used by Azure Cosmos DB to distribute data among multiple partitions3. A partition key should have a high cardinality, which means it should have many distinct values, such as hundreds or thousands1. A partition key should also align with the most common query patterns of your application, so that you can efficiently retrieve data by using the partition key value1.
Based on these criteria, one possible partition key that you could use for coll1 is B. customerId.
This partition key has the following advantages:
* It has a high cardinality, as each customer will have a unique ID
* It aligns with the query patterns of the application, as customers will often view their past order history3.
* It minimizes costs, as it reduces the number of cross-partition queries and optimizes the storage and throughput utilization1.
This partition key also has some limitations, such as:
* It may not be optimal for scenarios where orders need to be queried independently from customers or aggregated by date or other criteria
* It may result in hot partitions or throttling if some customers create orders more frequently than others or have more data than others
* It may not support transactions across multiple customers, as transactions are scoped to a single logical partition2.
Depending on your specific use case and requirements, you may need to adjust this partition key or choose a different one. For example, you could use a synthetic partition key that concatenates multiple properties of an item2, or you could use a partition key with a random or pre-calculated suffix to distribute the workload more evenly2.
NEW QUESTION # 71
You plan to implement con-iot1 and con-iot2.
You need to configure the default Time to Live setting for each container. The solution must meet the loT telemetry requirements.
What should you configure? To answer, select the appropriate options in the answer NOTE: Each correct selection is worth one point.
Answer:
Explanation:
NEW QUESTION # 72
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.
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.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
NEW QUESTION # 73
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.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
NEW QUESTION # 74
You need to provide a solution for the Azure Functions notifications following updates to con-product. The solution must meet the business requirements and the product catalog requirements.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
- A. Configure the trigger for each function to use the same leaseCollectionNair.e
- B. Configure the trigger for each function to use the same leaseCollectionPrefix
- C. Configure the trigger for each function to use a different leaseCollectionName
- D. Configure the trigger for each function to use a different leaseCollectionPrefix
Answer: C,D
Explanation:
leaseCollectionPrefix: when set, the value is added as a prefix to the leases created in the Lease collection for this Function. Using a prefix allows two separate Azure Functions to share the same Lease collection by using different prefixes.
Scenario: Use Azure Functions to send notifications about product updates to different recipients.
Trigger the execution of two Azure functions following every update to any document in the con-product container.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger
NEW QUESTION # 75
You plan to create an Azure Cosmos DB container named account that will contain items in the following format.
You need to define a query that will return the ids of all accounts that have ever recorded a negative value for balance.
How should you complete the query? To answer, select the appropriate options in the answer are a.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
NEW QUESTION # 76
......
The Best Microsoft DP-420 Study Guides and Dumps of 2025: https://www.verifieddumps.com/DP-420-valid-exam-braindumps.html
DP-420 Certification Overview Latest DP-420 PDF Dumps: https://drive.google.com/open?id=1wfzdTRG-lQ_8a5FCJuzeSzkx6X9iZWB6
