[Dec 15, 2023] DP-420 Ultimate Study Guide - DumpsTests [Q50-Q72]

Share

[Dec 15, 2023] DP-420 Ultimate Study Guide - DumpsTests

Ultimate Guide to Prepare DP-420 Certification Exam for Azure Cosmos DB Developer Specialty in 2023


A section outlining the topics of a Microsoft DP-420 Certification Exam

DP-420 Dumps cover the following topics of the Microsoft DP-420 Certification Exam:

  • Integrate an Azure Cosmos DB solution: 10%
  • Design and implement data distribution: 10%
  • Optimize an Azure Cosmos DB solution: 20%
  • Design and execute information models: 40%
  • Maintain an Azure Cosmos DB solution: 20%

Microsoft DP-420 exam is an industry-recognized certification designed for professionals who want to prove their expertise in designing and implementing cloud-native applications using Microsoft Azure Cosmos DB. This is an advanced-level exam that tests the candidate's knowledge and skills in cloud-native application development, Azure Cosmos DB, and other related technologies.

 

NEW QUESTION # 50
You have an Azure Cosmos DB for NoSQL account.
You plan 10 create a container named container1. The container1 container will store items that include two properties named nm 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 poky? To answer, select the appropriate options in the answer are a. NOTE: Each correct selection Is worth one point.

Answer:

Explanation:


NEW QUESTION # 51
You plan to create an Azure Cosmos DB Core (SQL) API account that will use customer-managed keys stored in Azure Key Vault.
You need to configure an access policy in Key Vault to allow Azure Cosmos DB access to the keys.
Which three permissions should you enable in the access policy? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Wrap Key
  • B. Update
  • C. Get
  • D. Verify
  • E. Sign
  • F. Unwrap Key
  • G. List

Answer: A,C,F


NEW QUESTION # 52
You have three containers in an Azure Cosmos DB Core (SQL) API account as shown in the following table.

You have the following Azure functions:
A function named Fn1 that reads the change feed of cn1
A function named Fn2 that reads the change feed of cn2
A function named Fn3 that reads the change feed of cn3
You perform the following actions:
Delete an item named item1 from cn1.
Update an item named item2 in cn2.
For an item named item3 in cn3, update the item time to live to 3,600 seconds.
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/sql/change-feed-design-patterns
https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed


NEW QUESTION # 53
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 that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
  • B. 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.
  • C. Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.
  • D. Create Author, Book, and Bookauthorlnk documents in the same container.

Answer: B

Explanation:
Store multiple entity types in the same container.


NEW QUESTION # 54
You have a multi-region Azure Cosmos DB account named account1 that has a default consistency level of strong.
You have an app named App1 that is configured to request a consistency level of session.
How will the read and write operations of App1 be handled? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Explanation
Box 1 = Write and replicate data to every region synchronously
This is because the write concern is mapped to the default consistency level configured on your Azure Cosmos DB account2, which is strong in this case. Strong consistency ensures that every write operation is synchronously committed to every region associated with your Azure Cosmos DB account1. The request level consistency level of session only applies to the read operations of App11.
Box 2: That has the lowest estimated latency to the client
This is because the read operations of App1 will use the session consistency level that is specified in the request options. Session consistency is a client-centric consistency model that guarantees monotonic reads, monotonic writes, and read-your-own-writes within a session. A session is scoped to a client connection or a stored procedure execution. Session consistency allows clients to read from any region that has the lowest latency to the client.


NEW QUESTION # 55
You have a container named container1 in an Azure Cosmos DB for NoSQL account named account1.
You configure container1 to use Always Encrypted by using an encryption policy as shown in the C# and the Java exhibits. (Click the C# tab to view the encryption policy in C#. Click the Java tab to see the encryption policy in Java.)


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
According to the Azure Cosmos DB documentation1, Always Encrypted is a feature designed to protect sensitive data, such as credit card numbers or national identification numbers, stored in Azure Cosmos DB.
Always Encrypted allows clients to encrypt sensitive data inside client applications and never reveal the encryption keys to the database.
To use Always Encrypted, you need to define an encryption policy for each container that specifies which properties should be encrypted and which data encryption keys (DEK) should be used. The DEKs are stored in Azure Cosmos DB and are wrapped by customer-managed keys (CMK) that are stored in Azure Key Vault.
Based on the encryption policy shown in the exhibits, the creditcard property is encrypted with a DEK named dek1, and the SSN property is encrypted with a DEK named dek2. Both DEKs are wrapped by a CMK named cmk1.
To answer your statements:
You can perform a query that filters on the creditcard property = No. This is because the creditcard property is encrypted and cannot be used for filtering or sorting operations1.
You can perform a query that filters on the SSN property = No. This is also because the SSN property is encrypted and cannot be used for filtering or sorting operations1 An application can be allowed to read the creditcard property while being restricted from reading the SSN property = Yes. This is possible by using different CMKs to wrap different DEKs and applying access policies on the CMKs in Azure Key Vault. For example, if you use cmk2 to wrap dek2 instead of cmk1, you can grant an application access to cmk1 but not cmk2, which means it can read the creditcard property but not the SSN property


NEW QUESTION # 56
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. customerId
  • B. id
  • C. orderDate
  • D. orderId

Answer: C

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 ID3.
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 criteria3.
It may result in hot partitions or throttling if some customers create orders more frequently than others or have more data than others1.
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 # 57
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 and you use the default settings for the policy.
Does this meet the goal?

  • A. No
  • B. Yes

Answer: B

Explanation:
Setting ConflictResolutionMode to Custom and using the default settings for the policy will not ensure that conflicts are sent to the conflict feed. You need to define a custom stored procedure using the "conflictingItems" parameter to handle conflicts properly.


NEW QUESTION # 58
You are developing an application that will connect to an Azure Cosmos DB for NoSQL account. The account has a single readme region and one agonal read region. The regions are configured for automatic failover.
The account has the following connect strings. (Line numbers are included for reference only.)

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
If the primary write region fails, applications that write to the database must use a different connection string to continue to use the service. = NOYou do not need to use a different connection string to continue to use the service if the primary write region fails. This is because Azure Cosmos DB supports automatic failover, which means that it will automatically switch the primary write region to another region in case of a regional outage2
. The application does not need to change the connection string or specify the failover priority3. The connection string contains a list of all the regions associated with your account, and Azure Cosmos DB will route the requests to the appropriate region based on the availability and latency1.
The primary Read-Only SQL Connection String and the Secondary Read-Only SQL Connection String will connect to different regions from an application running in the East US Azure region = YesThe primary read-only SQL connection string and the secondary read-only SQL connection string will connect to different regions from an application running in the East US Azure region. This is because the primary read-only SQL connection string contains the endpoint for the East US region, which is the same as the primary write region.
The secondary read-only SQL connection string contains the endpoint for the West US region, which is the additional read region. Therefore, if an application running in the East US Azure region uses these connection strings, it will connect to different regions depending on which one it chooses.
Applications can choose from which region by setting the PreferredLocations property within their connection properties = Yes Applications can choose from which region by setting the PreferredLocations property within their connection properties. This property allows you to specify a list of regions that you prefer to read from based on their proximity to your application2. Azure Cosmos DB will route the requests to the appropriate region based on the availability and latency1. You can also set the ApplicationRegion property to the region where your application is deployed, and Azure Cosmos DB will automatically populate the PreferredLocations property based on the geo-proximity from that location


NEW QUESTION # 59
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.
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:

Explanation

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.


NEW QUESTION # 60
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:
{
"name": "apple",
"type": ["fruit", "exotic"],
"orders": 10000
}
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: A,B

Explanation:
Explanation
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.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-array-contains


NEW QUESTION # 61
You have a database in an Azure Cosmos DB Core (SQL) API account. The database is backed up every two hours.
You need to implement a solution that supports point-in-time restore.
What should you do first?

  • A. Configure the Point In Time Restore settings for the account.
  • B. Create a new account that has a periodic backup policy.
  • C. Enable Continuous Backup for the account.
  • D. Configure the Backup & Restore settings for the account.

Answer: C


NEW QUESTION # 62
You have an app that stores data in an Azure Cosmos DB Core (SQL) API account The app performs queries that return large result sets.
You need to return a complete result set to the app by using pagination. Each page of results must return 80 items.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Answer:

Explanation:

Explanation

Step 1: Configure the MaxItemCount in QueryRequestOptions
You can specify the maximum number of items returned by a query by setting the MaxItemCount. The MaxItemCount is specified per request and tells the query engine to return that number of items or fewer.
Box 2: Run the query and provide a continuation token
In the .NET SDK and Java SDK you can optionally use continuation tokens as a bookmark for your query's progress. Azure Cosmos DB query executions are stateless at the server side and can be resumed at any time using the continuation token.
If the query returns a continuation token, then there are additional query results.
Step 3: Append the results to a variable
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-pagination


NEW QUESTION # 63
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 # 64
You have a container in an Azure Cosmos DB for NoSQL account that stores data about orders. The following is a sample of an order document.

Documents are up to 2 KB.
You plan to receive one million orders daily.
Customers will frequently view then past order history.
You are the evaluating whether to use orderDate as the partition key.
What are two effects of using orderDate as the partition key? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

  • A. You will exceed the maximum storage per partition.
  • B. There will always be a hot partition.
  • C. You will exceed the maximum number of partition key values.
  • D. Queries will run cross-partition.

Answer: B,D


NEW QUESTION # 65
You have a container named container! in an Azure Cosmos DB for NoSQL account.
You need to provide a user named User1 with the ability to insert items into container1 by using role-based access The solution must use the principle of least privilege.
Which roles should you assign to User1?

  • A. Cosmos DB Operator only
  • B. Cosmos DB Built-in Data Contributor only
  • C. DocumentDB Account Contributor and Cosmos DB Built-in Data Contributor
  • D. DocumentDB Account Contribute only

Answer: B

Explanation:
Explanation
The Cosmos DB Built-in Data Contributor role provides the necessary permissions to insert items into a container in an Azure Cosmos DB for NoSQL account. This role grants the minimum required privileges for the described task, adhering to the principle of least privilege.


NEW QUESTION # 66
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:

Explanation


NEW QUESTION # 67
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 # 68
You have a database named db1 in an Azure Cosmos DB for NoSQL account named account1. The db1 database has a manual throughput of 4,000 request units per second (RU/s).
You need to move db1 from manual throughput to autoscale throughput by using the Azure CLI. The solution must provide a minimum of 4,000 RU/s and a maximum of 40,000 RU/s.
How should you complete the CLI statements? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Answer:

Explanation:


NEW QUESTION # 69
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.

  • A. Create a database for orders and a database for order items.
  • B. Create a single database that contains a container for order and a container for order items.
  • C. Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents.
  • D. Create a single database that contains one container. Store orders and order items in separate documents in the container.

Answer: C

Explanation:
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 is 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.
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 criteria
* 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.


NEW QUESTION # 70
You have an Azure Cosmos DB for NoSQL account.
You plan 10 create a container named container1. The container1 container will store items that include two properties named nm 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 poky? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection Is worth one point.

Answer:

Explanation:

Explanation


NEW QUESTION # 71
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 "SqlContainersDelete"
  • B. | where OperationName startswith "SqlContainersThroughputUpdate"
  • C. | where OperationName startswith "AccountUpdateStart"
  • D. | where OperationName startswith "MongoCollectionsThroughputUpdate"

Answer: C

Explanation:
The following are the operation names in diagnostic logs for different operations:
RegionAddStart, RegionAddComplete
RegionRemoveStart, RegionRemoveComplete
AccountDeleteStart, AccountDeleteComplete
RegionFailoverStart, RegionFailoverComplete
AccountCreateStart, AccountCreateComplete
*AccountUpdateStart*, AccountUpdateComplete
VirtualNetworkDeleteStart, VirtualNetworkDeleteComplete
DiagnosticLogUpdateStart, DiagnosticLogUpdateComplete


NEW QUESTION # 72
......

Azure Cosmos DB Developer Specialty Fundamentals-DP-420 Exam-Practice-Dumps: https://prep4sure.dumpstests.com/DP-420-latest-test-dumps.html