nerdexam
Microsoft

AZ-204 · Question #477

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…

The correct answer is C. Create an unsharded collection to store documents. D. Configure Azure Cosmos DB to use the MongoDB API. 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…

Submitted by zhang_li· Mar 30, 2026Develop for Azure storage

Question

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.

Options

  • ACreate a collection sharded on username to store documents.
  • BConfigure Azure Cosmos DB to use the Gremlin API.
  • CCreate an unsharded collection to store documents.
  • DConfigure Azure Cosmos DB to use the MongoDB API.

How the community answered

(29 responses)
  • A
    14% (4)
  • B
    3% (1)
  • C
    83% (24)

Explanation

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 https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/use-multi-document- transactions#requirements

Topics

#Azure Cosmos DB#ACID transactions#MongoDB API#partition key

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice