exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 3 question 37 discussion

Actual exam question from Microsoft's AZ-204
Question #: 37
Topic #: 3
[All AZ-204 Questions]

You are updating an application that stores data on Azure and uses Azure Cosmos DB for storage. The application stores data in multiple documents associated with a single username.

The application requires the ability to update multiple documents for a username in a single ACID operation.

You need to configure Azure Cosmos DB.

Which two actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

  • A. Create a collection sharded on username to store documents.
  • B. Configure Azure Cosmos DB to use the Gremlin API.
  • C. Create an unsharded collection to store documents.
  • D. Configure Azure Cosmos DB to use the MongoDB API.
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
imanonion
Highly Voted 1 year, 9 months ago
Selected Answer: CD
Agreed! To update multiple documents for a username in a single ACID operation in Azure Cosmos DB, you need to ensure that the documents are stored in the same logical partition. To do this, you should perform the following actions: Create an unsharded collection to store documents. This will ensure that all documents are stored in the same logical partition. Configure Azure Cosmos DB to use the MongoDB API. The MongoDB API supports multi-document ACID transactions, which allow you to update multiple documents in a single atomic operation.
upvoted 26 times
Dotar
1 year, 9 months ago
How do you know that the documents should be stored in the same logical partition. Is this a requirement for MongoDB API?
upvoted 3 times
surprise0011
1 year, 6 months ago
all operations like executing stored procedures or udf are effecting only items within single partition regardless of used API
upvoted 1 times
...
...
...
[Removed]
Highly Voted 1 year, 6 months ago
Got this in exam today (5 April 2023)
upvoted 6 times
...
raymond_abcd
Most Recent 9 months ago
Forget previous comment, not correct
upvoted 2 times
...
raymond_abcd
9 months ago
I think it is AD because you need to shard across partitions on username to be able to process all documents with that user name in one transactional batch. You have to create a shard key for this in the cosmos db container based on the username.
upvoted 2 times
...
[Removed]
1 year, 3 months ago
Correct answer is AD
upvoted 3 times
...
Bokomi
1 year, 5 months ago
Selected Answer: CD
To update multiple documents for a username in a single ACID operation in Azure Cosmos DB, you should perform the following actions: C. Create an unsharded collection to store documents, since sharded collections do not support multi-document transactions. D. Configure Azure Cosmos DB to use the MongoDB API, since it is the only API that supports multi-document transactions. Therefore, the correct actions are C and D.
upvoted 4 times
...
Xin0613
1 year, 5 months ago
Agreed!
upvoted 1 times
...
Esward
1 year, 8 months ago
It was there in 13 Feb 2023 exam
upvoted 3 times
...
Esward
1 year, 9 months ago
CD are correct update multiple documents for a username in a single ACID operation.
upvoted 3 times
Esward
1 year, 9 months ago
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/use-multi-document-transactions#requirements
upvoted 5 times
...
...
g2000
1 year, 9 months ago
Selected Answer: CD
multi-document transaction is only supported within unsharded collection. https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/use-multi-document-transactions#requirements
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago