📘 Free DP-420 Sample Questions
An application team is running tests to ensure that user entry fields will not accept invalid input of any length. What type of negative testing is this an example of?
A
Reasonable data
B
Population of required fields
C
Allowed number of characters
D
Session testing
Correct Answer:
A. Reasonable data
Explanation:
https://avoautomation.ai/how-to-automate-negative-testing/Reasonable data is a type of negative testing. "Reasonable data refers to fields that have reasonable limits on entries. For instance, the age field cannot be negative or something unusual like 200 years. The system needs to recognize this behaviour, flag it as inappropriate, and guide the user towards filling it the right way."
"invalid input of any length" - okay, that disqualifies C as that is only looking at number of characters, not the validity of those characters. , I have to yell this: REASONABLE DATA IS A NEGATIVE TESTING TECHNIQUE!!Reasonable data – Some applications and web pages include fields that have a reasonable limit, for example, entering 200 or a negative number as the value for the “Your age:” field is not allowed. To check the application's behaviour, CREATE A NEGATIVE TEST that enters invalid data into the specified field.
HOTSPOT -
You have an Azure Cosmos DB Core (SQL) API account named account1 that has the disableKeyBasedMetadataWriteAccess property enabled.
You are developing an app named App1 that will be used by a user named DevUser1 to create containers in account1. DevUser1 has a non-privileged user account in the Azure Active Directory (Azure AD) tenant.
You need to ensure that DevUser1 can use App1 to create containers in account1. What should you do? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
Hot Area:
A
Correct Answer:
A.
Explanation:
Box 1: Role -based access control Box 2: Azure Resource Manager API
You can use Azure Resource Manager to help deploy and manage your Azure Cosmos DB accounts, databases, and containers.
Incorrect Answers:
The Microsoft Graph API is a RESTful web API that enables you to access Microsoft Cloud service resources.
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.
A
Correct Answer:
A.
Explanation:
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: No
HOTSPOT -
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. Hot Area:
A
Correct Answer:
A.
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
HOTSPOT -
You have a container named container1 in an Azure Cosmos DB Core (SQL) API account. The container1 container has 120 GB of data.
The following is a sample of a document in container1.
A
Correct Answer:
A.
Explanation:
Box 1: Yes -
Records with different OrderIDs will match.
Box 2: Yes -
Records with different OrderIDs will match.
Box 3: No -
Only records with one specific OrderId will match
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.
A
Use timestamp as the partition key.
B
Create a new synthetic key that contains deviceId and sensor1Value.
C
Create a new synthetic key that contains deviceId and deviceManufacturer.
D
Create a new synthetic key that contains deviceId and a random number.
Correct Answer:
D. Create a new synthetic key that contains deviceId and a random number.
Explanation:
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
You maintain a relational database for a book publisher. The database contains the following tables.
A
Create a container for Author and a container for Book. In each Author document, embed bookId for each book by the author. In each Book document embed authorId of each author.
B
Create Author, Book, and Bookauthorlnk documents in the same container.
C
Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
D
Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.
Correct Answer:
C. Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
Explanation:
Microsoft;s own documentation clearly states that for groups of data with like PKs (and it would be author here) use the same container. C is the answer
You have an Azure Cosmos DB Core (SQL) API account.
You run the following query against a container in the account.
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 ]
Correct Answer:
A. [ "A": false, "B": true, "C": false ]
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
You need to implement a trigger in Azure Cosmos DB Core (SQL) API that will run before an item is inserted into a container.
Which two actions should you perform to ensure that the trigger runs? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
A
Append pre to the name of the JavaScript function trigger.
B
For each create request, set the access condition in RequestOptions.
C
Register the trigger as a pre-trigger.
D
For each create request, set the consistency level to session in RequestOptions.
E
For each create request, set the trigger name in RequestOptions.
Correct Answer:
C. Register the trigger as a pre-trigger.
Explanation:
C: When triggers are registered, you can specify the operations that it can run with.
F: When executing, pre-triggers are passed in the RequestOptions object by specifying PreTriggerInclude and then passing the name of the trigger in a List object.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-use-stored-procedures-triggers-udfs
HOTSPOT -
You have a container in an Azure Cosmos DB Core (SQL) API account.
You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency. What should you include in the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.
Hot Area:
A
Correct Answer:
A.
Explanation:
Box 1: Access condition
Box 2: _etag -
The ItemRequestOptions class helped us implement optimistic concurrency by specifying that we wanted the SDK to use the If-Match header to allow the server to decide whether a resource should be updated. The If- Match value is the ETag value to be checked against. If the ETag value matches the server ETag value, the resource is updated.
Questions: 1-10 out of 207
Continue Full Practice..
GET ALL 207 QUESTIONS