281 Q&As in UPDATED DP-420 Exam Questions Certification Test Engine to PDF
Get The Important Preparation Guide With DP-420 Dumps
NEW QUESTION # 106
You have an Azure Cosmos DB for NoSQL account that has multiple write regions.
You need to receive an alert when requests that target the database exceed the available request units per second (RU/s).
Which Azure Monitor signal should you use?
- A. Data Usage
- B. Metadata Requests
- C. Region Removed
- D. Provisioned Throughput
Answer: B
Explanation:
Azure Monitor is a service that provides comprehensive monitoring for Azure resources, including Azure Cosmos DB. You can use Azure Monitor to collect, analyze, and alert on metrics and logs from your Azure Cosmos DB account. You can create alerts for Azure Cosmos DB using Azure Monitor based on the metrics, activity log events, or Log Analytics logs on your account1.
For your scenario, if you want to receive an alert when requests that target the database exceed the available request units per second (RU/s), you should use the Document Quota metric. This metric measures the percentage of RU/s consumed by your account or container. You can create an alert rule on this metric from the Azure portal by following these steps2:
In the Azure portal, select the Azure Cosmos DB account you want to monitor.
Under the Monitoring section of the sidebar, select Alerts, and then select New alert rule.
In the Create alert rule pane, fill out the Scope section by selecting your subscription name and resource type (Azure Cosmos DB accounts).
In the Condition section, select Add condition and choose Document Quota from the list of signals.
In the Configure signal logic pane, specify the threshold value and operator for your alert condition. For example, you can choose Greater than or equal to 90 as the threshold value and operator to receive an alert when your RU/s consumption reaches 90% or more of your provisioned throughput.
In the Alert rule details section, specify a name and description for your alert rule.
In the Actions section, select Add action group and choose how you want to receive notifications for your alert. For example, you can choose Email/SMS/Push/Voice as an action type and enter your email address or phone number as a receiver.
Review your alert rule settings and select Create alert rule to save it.
NEW QUESTION # 107
You have a container in 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 familyId.
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?
- A. Update the document of each family member separately and set the consistency level to strong
- B. Update the document of each family member by using a transactional batch operation
- C. Update the document of each family member separately by using a patch operation
Answer: B
Explanation:
Each transaction provides ACID (Atomicity, Consistency, Isolation, Durability) property guarantees.
Transactional batch operations offer reduced latency on equivalent operations.
Note: Transactional batch describes a group of point operations that need to either succeed or fail together with the same partition key in a container. In the .NET SDK, the TransactionalBatch class is used to define this batch of operations. If all operations succeed in the order they are described within the transactional batch operation, the transaction will be committed. However, if any operation fails, the entire transaction is rolled back.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/transactional-batch
NEW QUESTION # 108
You configure Azure Cognitive Search to index a container in an Azure Cosmos DB Core (SQL) API account as shown in the following exhibit.
Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
NEW QUESTION # 109
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.
Answer:
Explanation:
Explanation:
NEW QUESTION # 110
You have the indexing policy shown in the following exhibit.
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:
Explanation
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:
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.
The order of composite index paths (ascending or descending) should also match the order in the ORDER BY clause.
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:
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.
None: Indexing is disabled on the container.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/index-policy
NEW QUESTION # 111
You have an Azure Cosmos DB for NoSQL account that frequently receives the same three queries.
You need to configure indexing to minimize RUs consumed by the queries.
Which type of index should you use for each query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation:
Box 1 = Range Azure Cosmos DB supports three types of indexes: range, spatial and composite. For the query you provided, which is an equality query on a single property, the best type of index to use is range. Range index is based on an ordered tree-like structure and it is used for equality queries, range queries and checking for the presence of a property1. Range index also supports any string or number2.
Box 2 = Composite
Azure Cosmos DB supports three types of indexes: range, spatial and composite. For the query you provided, which is an order by query on two properties, the best type of index to use is composite. Composite index is used for optimizing order by queries on multiple properties1. Composite index allows you to specify a list of property paths and sort orders that are used for ordering items2.
Box 3 = spatial
Azure Cosmos DB supports three types of indexes: range, spatial and composite. For the query you provided, which is a spatial query on a point property, the best type of index to use is spatial. Spatial index is used for querying items based on their location or proximity to a given point1. Spatial index supports point, polygon and linestring data types2.
NEW QUESTION # 112
You have an Azure subscription that contains the resources shown in the following table.
You need to query Container1 from the serverless SQL pool of workspace1.
How should you complete the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation:
NEW QUESTION # 113
You have an Azure Cosmos DB for NoSQL account named account1 that supports an application named App1. App1 uses the consistent prefix consistency level.
You configure account1 to use a dedicated gateway and integrated cache.
You need to ensure that App1 can use the integrated cache.
Which two actions should you perform for APP1? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
- A. Change the account endpoint to https://account1.documents.azure.com
- B. Change the account endpoint to https://account1.sqlx.cosmos.azure.com.
- C. Change the consistency level of requests to session.
- D. Change the connection mode to direct
- E. Change the consistency level of requests to strong.
Answer: B,C
Explanation:
the Azure Cosmos DB integrated cache is an in-memory cache that is built-in to the Azure Cosmos DB dedicated gateway. The dedicated gateway is a front-end compute that stores cached data and routes requests to the backend database. You can choose from a variety of dedicated gateway sizes based on the number of cores and memory needed for your workload1. The integrated cache can reduce the RU consumption and latency of read operations by serving them from the cache instead of the backend containers2.
For your scenario, to ensure that App1 can use the integrated cache, you should perform these two actions:
* Change the account endpoint to https://account1.sqlx.cosmos.azure.com. This is the dedicated gateway endpoint that you need to use to connect to your Azure Cosmos DB account and leverage the integrated cache. The standard gateway endpoint (https://account1.documents.azure.com) will not use the integrated cache2.
* Change the consistency level of requests to session. This is the highest consistency level that is supported by the integrated cache. If you use a higher consistency level (such as strong or bounded staleness), your requests will bypass the integrated cache and go directly to the backend containers
NEW QUESTION # 114
You have an Apache Spark pool in Azure Synapse Analytics that runs the following Python code in a notebook.
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:
New and updated orders will be added to contoso-erp.orders: Yes
The code performs bulk data ingestion from contoso-app: No
Both contoso-app and contoso-erp have Analytics store enabled: Yes
The code uses the spark.readStream method to read data from a container named orders in a database named contoso-app. The data is then filtered by a condition and written to another container named orders in a database named contoso-erp using the spark.writeStream method. The write mode is set to "append", which means that new and updated orders will be added to the destination container1.
The code does not perform bulk data ingestion from contoso-app, but rather stream processing. Bulk data ingestion is a process of loading large amounts of data into a data store in batches. Stream processing is a process of continuously processing data as it arrives in real-time2.
Both contoso-app and contoso-erp have Analytics store enabled, because they are both accessed by Spark pools using the spark.cosmos.oltp method. This method requires that the containers have Analytics store enabled, which is a feature that allows Spark pools to query data stored in Azure Cosmos DB containers using SQL APIs3.
NEW QUESTION # 115
You have an Azure Cosmos DB for NoSQL account named account1 that supports an application named App1. App1 uses the consistent prefix consistency level.
You configure account1 to use a dedicated gateway and integrated cache.
You need to ensure that App1 can use the integrated cache.
Which two actions should you perform for App1? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
- A. Change the consistency level of requests to session.
- B. Change the account endpoint to http://account1.sqlx.cosmos.azure.com.
- C. Change the account endpoint to http://account1.documents.azure.com.
- D. Change the connection mode to direct.
- E. Change the consistency level of requests to strong.
Answer: A,B
Explanation:
A: You must adjust the request consistency to session or eventual. If not, the request will always bypass the integrated cache.
C: Modify your application's connection string to use the new dedicated gateway endpoint.
All dedicated gateway connection strings follow the same pattern. Remove documents.azure.com from your original connection string and replace it with sqlx.cosmos.azure.com. A dedicated gateway will always have the same connection string, even if you remove and reprovision it.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-integrated-cache
NEW QUESTION # 116
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 an Azure Cosmos DB Core (SQL) API account named account 1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure the function to have an Azure CosmosDB trigger.
Does this meet the goal?
- A. No
- B. Yes
Answer: A
Explanation:
Explanation
Instead configure an Azure Monitor alert to trigger the function.
You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts
NEW QUESTION # 117
You have an Azure Cosmos DB for NoSQL account.
You run the following query against a container in the account.
What is the output of the query?
- A. [{"A": true, "B": true, "C": false}]
- B. [{"A": true, "B": false, "C": true}]
- C. [{"A": false, "B": true, "C": false}]
- D. [{"A": true, "B": true, "C": true}]
Answer: C
Explanation:
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
NEW QUESTION # 118
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named DB1.
You develop a software as a service (SaaS) app named App1 that uses DB1. App1 will be used by multiple vendors to manage their customers.
You need to create a container in DB1 that will store customer and order details for each vendor.
The solution must meet the following requirements:
- Each vendor must have a unique tenant ID.
- The performance of the container must be optimized for reads.
- Customer IDs can be duplicated across the container but must be
unique for each vendor.
- The container must be optimized for concurrent queries from multiple
customers. Each query will return data for a single vendor.
How should you configure the container?
- A. Add a partition key to the customer ID and a unique key policy to the tenant ID.
- B. Add hierarchical partition key on (customer identifier, tenant identifier).
- C. Add a partition key to the tenant ID and a unique key policy to the customer ID.
- D. Add hierarchical partition key on (tenant identifier, customer identifier).
Answer: D
Explanation:
For this multi-tenant SaaS scenario, you should use a hierarchical partition key and a unique key policy.
Partitioning Strategy: Hierarchical Partition Key
A hierarchical partition key (subpartitioning) is the optimal choice for your requirements.
Structure: Define the hierarchy as /TenantId followed by /CustomerId.
Why it meets your needs:
Single Vendor Scope: Since every query returns data for a single vendor, including TenantId as the first level of the hierarchy ensures all related data is logically grouped and queries are efficiently routed to the correct partitions.
Scale Beyond 20 GB: Standard partition keys limit a single logical partition (e.g., one vendor) to
20 GB. Hierarchical partitioning allows a single TenantId to scale across multiple physical partitions, supporting larger vendors without hitting storage limits.
Read Optimization: It optimizes concurrent queries from multiple customers by distributing the workload of a single large vendor across different subpartitions.
Reference:
https://devblogs.microsoft.com/cosmosdb/scaling-multi-tenant-go-applications-choosing-the-right-database-partitioning-approach/
NEW QUESTION # 119
You have an Azure Cosmos DB account named account1.
You need to access account1 from an on-premises environment by using a Site-to-Site VPN.
What should you use?
- A. Azure Synapse Link
- B. a private endpoint
- C. a dedicated gateway
Answer: B
Explanation:
A private endpoint allows you to access Azure services, including Azure Cosmos DB, privately from within an Azure virtual network. By configuring a private endpoint for the Azure Cosmos DB account, you can connect to the account using private IP addresses and ensure that the data transfer occurs securely over the Site-to-Site VPN between the on-premises network and the Azure virtual network.
With a private endpoint, the data traffic from the on-premises environment to Azure Cosmos DB remains within the private network and does not traverse the public internet, enhancing security and isolation.
NEW QUESTION # 120
You have an Azure Cosmos DB for NoSQL account1 that is configured for automatic failover. The account1 account has a single read-write region in West US and a and a read region in East US.
You run the following PowerShell command.
What is the effect of running the command?
- A. The account will be unavailable to writes during the change.
- B. The account will be configured for multi-region writes.
- C. A manual failover will occur.
- D. The provisioned throughput for account1 will increase.
Answer: A
Explanation:
You can use the Set-AzCosmosDBAccountRegion cmdlet to update the regions that an Azure Cosmos DB account uses. You can use this cmdlet to add a region or change the region failover order. The cmdlet requires a resource group name, an Azure Cosmos DB account name, and a list of regions in desired failover order1.
For your scenario, based on the PowerShell command, you are using the Set-AzCosmosDBAccountRegion cmdlet to update the regions for an Azure Cosmos DB account named account1 that is configured for automatic failover. The command specifies two regions: West US and East US. The effect of running the command is that the account will be configured for multi-region writes.
Multi-region writes is a feature of Azure Cosmos DB that allows you to write data to any region in your account and have it automatically replicated to all other regions. This feature provides high availability and low latency for write operations across multiple regions. To enable multi-region writes, you need to specify at least two regions in your account and set them as write regions2. In your command, you are setting both West US and East US as write regions by using the -IsZoneRedundant parameter with a value of $true for both regions.
Topic 1, Litware, inc
Overview
This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.
To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.
At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.
To start the case study
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.
Overview
Litware, Inc. is a United States-based grocery retailer. Litware has a main office and a primary datacenter in Seattle. The company has 50 retail stores across the United States and an emerging online presence. Each store connects directly to the internet.
Existing environment. Cloud and Data Service Environments.
Litware has an Azure subscription that contains the resources shown in the following table.
Each container in productdb is configured for manual throughput.
The con-product container stores the company's product catalog data. Each document in con-product includes a con-productvendor value. Most queries targeting the data in con-product are in the following format.
SELECT * FROM con-product p WHERE p.con-productVendor - 'name'
Most queries targeting the data in the con-productVendor container are in the following format SELECT * FROM con-productVendor pv ORDER BY pv.creditRating, pv.yearFounded Existing environment. Current Problems.
Litware identifies the following issues:
Updates to product categories in the con-productVendor container do not propagate automatically to documents in the con-product container.
Application updates in con-product frequently cause HTTP status code 429 "Too many requests". You discover that the 429 status code relates to excessive request unit (RU) consumption during the updates.
Requirements. Planned Changes
Litware plans to implement a new Azure Cosmos DB Core (SQL) API account named account2 that will contain a database named iotdb. The iotdb database will contain two containers named con-iot1 and con-iot2.
Litware plans to make the following changes:
Store the telemetry data in account2.
Configure account1 to support multiple read-write regions.
Implement referential integrity for the con-product container.
Use Azure Functions to send notifications about product updates to different recipients.
Develop an app named App1 that will run from all locations and query the data in account1.
Develop an app named App2 that will run from the retail stores and query the data in account2. App2 must be limited to a single DNS endpoint when accessing account2.
Requirements. Business Requirements
Litware identifies the following business requirements:
Whenever there are multiple solutions for a requirement, select the solution that provides the best performance, as long as there are no additional costs associated.
Ensure that Azure Cosmos DB costs for IoT-related processing are predictable.
Minimize the number of firewall changes in the retail stores.
Requirements. Product Catalog Requirements
Litware identifies the following requirements for the product catalog:
Implement a custom conflict resolution policy for the product catalog data.
Minimize the frequency of errors during updates of the con-product container.
Once multi-region writes are configured, maximize the performance of App1 queries against the data in account1.
Trigger the execution of two Azure functions following every update to any document in the con-product container.
NEW QUESTION # 121
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:
Explanation:
Box 1: Last Write Wins (LWW) (default) mode
Last Write Wins (LWW): This resolution policy, by default, uses a system-defined timestamp property. It ' s based on the time-synchronization clock protocol.
Box 2: Merge Procedures (custom) mode
Custom: This resolution policy is designed for application-defined semantics for reconciliation of conflicts.
When you set this policy on your Azure Cosmos container, you also need to register a merge stored procedure. This procedure is automatically invoked when conflicts are detected under a database transaction on the server. The system provides exactly once guarantee for the execution of a merge procedure as part of the commitment protocol.
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 # 122
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:
Explanation:
Box 1: Last Write Wins (LWW) (default) mode
Last Write Wins (LWW): This resolution policy, by default, uses a system-defined timestamp property. It's based on the time-synchronization clock protocol.
Box 2: Merge Procedures (custom) mode
Custom: This resolution policy is designed for application-defined semantics for reconciliation of conflicts.
When you set this policy on your Azure Cosmos container, you also need to register a merge stored procedure.
This procedure is automatically invoked when conflicts are detected under a database transaction on the server. The system provides exactly once guarantee for the execution of a merge procedure as part of the commitment protocol.
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 # 123
You configure a backup for an Azure Cosmos DB for NoSQL account as shown in the following exhibit.
Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation:
Box 1 = The current backup policy provides protection for: 2 Hours
Azure Cosmos DB automatically takes backups of your data at regular intervals. The backup interval and the retention period can be configured from the Azure portal. You can also choose between two backup modes:
periodic backup mode and continuous backup mode. Periodic backup mode is the default mode for all existing accounts and it takes a full backup of your database every 4 hours by default. Cont inuous backup mode is a new mode that allows you to restore to any point of time within either 7 or 30 days 1 .
For your scenario, based on the exhibit, you have configured a backup for an Azure Cosmos DB for NoSQL account using the periodic backup mode with a backup interval of 1 hour and a reten tion period of 2 hours.
This means that Azure Cosmos DB will take a full backup of your database every hour and keep only the latest two backups. Therefore, the current backup policy provides protection for 2 hours .
Box 2: In case of emergency, you must (answer choice) to restore the backup = create a support ticket Azure Cosmos DB automatically takes backups of your data at regular intervals. You can configure the backup interval and the retention period from the Azure portal. You can also choose between two backup modes: periodic backup mode and continuous backup mode. Periodic backup mode is the default mode for all existing accounts and it takes a full backup of your database every 4 hours by default. Continuous backup mode is a new mode that allows you to restore to any point of time within either 7 or 30 days 1 .
For your scenario, based on the exhibit, you have configured a backup for an Azure Cosmos DB for NoSQL account using the periodic backup mode with a backup interval of 1 hour and a retention period of 2 hours.
This means that Azure Cosmos DB will take a full backup of your database every hour and keep only the latest two backups. In case of emergency, you must create a support ticket to restore the backup. This is the answer to your question.
To restore data from a periodic backup, you need to create a support request with Azure Cosmos DB team and provide the following information:
* The name of your Azure Cosmos DB account
* The name of the database or container that you want to restore
* The date and time (in UTC) that you want to restore from
* The name of the target Azure Cosmos DB account where you want to restore the data
* The name of the target resource group where you want to restore the data The Azur e Cosmos DB team will then initiate the restore process and notify you when it is completed 2 .
NEW QUESTION # 124
You need to create a data store for a directory of small and medium-sized businesses (SMBs). The data store must meet the following requirements:
* Store companies and the users employed by them. Each company will have less than 1,000 users.
* Some users have data that is greater than 2 KB.
* Associate each user to only one company.
* Provide the ability to browse by company.
* Provide the ability to browse the users by company.
* Whenever a company or user profile is selected, show a details page for the company and all the related users.
* Be optimized for reading data.
Which design should you implement to optimize the data store for reading data?
- A. Create a user container that uses the user ID as the partition key and a company container that container that uses the company ID as the partition key. Add the company ID to each user documents.
- B. In a directory container, create a document for each company and a document for each user. Use company ID as the partition key.
- C. In a company container, create a document for each company. Embed the users into company documents. Use the company ID as the partition key.
- D. In a user container, create a document for each user. Embed the company into each user document. Use the user ID as the partition key.
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 optimize the data store for reading data, 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 design that you could implement is B. In a company container, create a document for each company. Embed the users into company documents. Use the company ID as the partition key.
This design has the following advantages:
* It stores companies and users as self-contained documents that can be easily retrieved by company ID1.
* It avoids storing redundant data or creating additional containers for users1.
* It allows you to browse by company and browse the users by company with simple queries1.
* It shows a details page for the company and all the related users by fetching a single document1.
* It leverages the benefits of embedding data, such as reducing the number of requests, improving query performance, and simplifying data consistency2.
This design also has some limitations, such as:
* It may not be suitable for some users who 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 users need to be associated with more than one company or queried independently from companies2.
* It may not be scalable for companies that have more than 1,000 users, as it could result in hot partitions or throttling2.
Depending on your specific use case and requirements, you may need to adjust this design 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 # 125
You need to create a database in an Azure Cosmos DB for NoSQL account. The database will contain three containers named coll1, coll2 and coll3. The coll1 container will have unpredictable read and write volumes.
The col!2 and coll3 containers will have predictable read and write volumes. The expected maximum throughput for coll1 and coll2 is 50,000 request units per second (RU/s) each.
How should you provision the collection while minimizing costs?
- A. Create a serverless account.
- B. Create a provisioned throughput account. Set the throughput for coll1 to Manual. Set the throughput for coll2 and coll3 to Autoscale.
- C. Create a provisioned throughput account. Set the throughput for call1 to Autoscale. Set the throughput for call2 and coll3 to Manual.
Answer: C
Explanation:
Azure Cosmos DB offers two different capacity modes: provisioned through put and serverless 1 .
Provisioned throughput mode allows you to configure a certain amount of throughput (expressed in Request Units per second or RU/s) that is provisioned on your databases and containers. You get billed for the amount of throughput you've provisioned, regardless of how many RUs were consumed 1 . Serverless mode allows you to run your database operations without having to configure any previously provisioned capacity. You get billed for the number of RUs that were consumed by your database operations and the storage consumed by your data 1 .
To create a database that minimizes costs, you should consider the following factors:
* The read and write volumes of your containers
* The predictability and variability of your traffic
* The latency and throughput requirements of your application
* The geo-distribution and availability needs of your data
Based on these factors, one possible option that you could choose is B. Create a provisioned throughput account. Set the throughput for coll1 to Autoscale. Set the throughput for coll2 and coll3 to Manual .
This option has the following advantages:
* It allows you to handle unpredictable read and write v olumes for coll1 by using Autoscale, which automatically adjusts the provisioned throughput based on the current load 1 .
* It allows you to handle predictable read and write volumes for coll2 and coll3 by using Manual, which le ts you specify a fixe d amount of provisioned throughput that meets your performance needs 1 .
* It allo ws you to optimize your costs by paying only for the throughput you need for each container 1 .
* It allows you to enable geo-distribution for your account if you need to r eplicate your data across multiple regions 1 .
This option also has some limitations, such as:
* It may not be suitable for scenarios where all containers have intermittent or bursty traffic that is hard to forecast or has a low average-to-peak ratio 1 .
* It may not be optimal for scenarios where all containers have low or sporadic traffic that does not justify provisioned capacity 1 .
* It may not support availability zones or multi-master replication for your account 1 .
Depending on your specific use case and requirements, you may need to choose a different option. F or example, you could use a serverless account if all containers have low or sporadic traffic that does not require predictable performance or geo-distribution 1 . Alternatively, you could use a provisioned t hroughput account with Manual for all c ontainers if all containers have stable and consistent traffic that requires predictable performance or geo-distribution 1 .
NEW QUESTION # 126
You have an Azure Cosmos DB for NoSQL account that contains a database named DB1.
Users run the following query against DB1.
SELECT *
FROM c
WHERE c.bikeParts = "Frame, Chain, Peddles"
ORDER BY c.bikeParts ASC
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?
- A. ORDER BY c._ts DESC, c.bikeParts ASC
- B. ORDER BY c.bikeParts DESC, c._ts ASC
- C. ORDER BY c._ts ASC, c.bikeParts DESC
- D. ORDER BY c.bikeParts ASC, c._ts ASC
Answer: B
Explanation:
Need to first sort on c.bikeParts DESC to keep the same order.
Note: ts. A read-only and system-generated timestamp. The value is the Document's last-updated timestamp, in seconds from the UNIX epoch.
Incorrect:
[Not A, Not C]
Need ASC c.bikeParts sorting on not DESC
[Not B]
Need to first sort on c.bikeParts to keep the same order.
If the indexing mode is set to consistent, the system properties id and _ts are automatically indexed.
Reference:
https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/documentdb/feature-representation.htm
NEW QUESTION # 127
Note: This section contains one or more sets of questions with the same scenario and problem. Each question presents a unique solution to the problem. You must determine whether the solution meets the stated goals. More than one solution in the set might solve the problem. It is also possible that none of the solutions in the set solve the problem.
After you answer a question in this section, you will NOT be able to return. As a result, these questions do not appear on the Review Screen.
You have an Azure Cosmos DB for NoSQL database. The database hosts a container named families that stores data in the following format.
You need to return the following data:
- The ID of the family
- The family names of the children
- The name of any pets if the pet is a cat
Solution: You run the following query.
Does this meet the goal?
- A. Yes
- B. No
Answer: A
Explanation:
Correct:
* You run the following query.
The following Azure Cosmos DB NoSQL query fulfills the requirements by unnesting child array items and filtering the pet array:
To retrieve the family ID, the children's family names, and the rabbit's name, you can use the query below.
SELECT f.id, c.familyName AS FamilyName, p.givenName AS petName
FROM families f
JOIN f.children c
JOIN (SELECT VALUE p FROM p IN c.pets WHERE p.type = 'cat') AS p
1. Flatten the Children Array
To access individual properties within the children sub-array, use a JOIN statement. In Azure Cosmos DB, a JOIN performs an inner product between the document root (f) and the array (f.children). This filters out any family documents that contain no children.
2. Isolate Cat Pets
To inspect the properties of the pets array embedded inside each child, apply a secondary JOIN on c.pets. The WHERE clause then filters these projected items to only include cases where the property $p.type$ matches the string "cat".
3. Project Specific Attributes
The SELECT clause restricts the final JSON output schema to contain exactly three custom- aliased properties:
familyId: Extracted from the root document
IDchildFamilyName: Extracted from the current child item
iterationpetName: Extracted from the matching pet item iteration
Incorrect:
* You run the following query.
Use two JOINS and one subquery, not three JOINS and a subquery.
* You run the following query.
CROSS APPLY should not be used.
Reference:
https://learn.microsoft.com/en-us/cosmos-db/query/subquery
NEW QUESTION # 128
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:
NEW QUESTION # 129
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,D
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 # 130
......
Prepare With Top Rated High-quality DP-420 Dumps For Success in Exam: https://www.dumpsreview.com/DP-420-exam-dumps-review.html
Get Totally Free Updates on DP-420 Dumps PDF Questions: https://drive.google.com/open?id=1JkPS6hwkhgzcWv4Kzxgo2n-qVqJRS5tC

