You have a container in an Azure Cosmos DB Core (SQL) API 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?
- Update the document of each family member separately by using a patch operation
- Update the document of each family member separately and set the consistency level to strong
- Update the document of each family member by using a transactional batch operation
Answer(s): C
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 de ne 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
Reveal Solution Next Question