DP-420 · Question #170
DP-420 Question #170: Real Exam Question with Answer & Explanation
The correct answer is A: items in the same container. Transactional batch operations in Azure Cosmos DB Transactional batch describes a group of point operations that need to either succeed or fail together with the same partition key in a container. Operations are defined, added to the batch, and the batch is executed. If all opera
Question
You are designing an Azure Cosmos DB for NoSQL data model that will contain authors, books the authors have written, and reviews of the books. You need to maintain referential integrity between entities by using server-side transactional support. What is the largest scope of the transactions you can use?
Options
- Aitems in the same container
- Ba single item
- Citems in the same database
- Ditems in the same logical partition
Explanation
Transactional batch operations in Azure Cosmos DB Transactional batch describes a group of point operations that need to either succeed or fail together with the same partition key in a container. Operations are defined, added to the batch, and the batch is executed. If all operations succeed in the order they're described within the transactional batch operation, the transaction will be committed. However, if any operation fails, the entire transaction is rolled back. Does Azure Cosmos DB for NoSQL support ACID (atomicity, consistency, isolation, durability) Yes, the API for NoSQL supports cross-document transactions expressed using either batches in the SDKs or as JavaScript-stored procedures and triggers. Transactions are scoped to a single partition within each container and executed with ACID semantics as "all or nothing," isolated from other concurrently executing code and user requests. If exceptions occur, the entire transaction is rolled back. https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/transactional-batch https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/faq
Topics
Community Discussion
No community discussion yet for this question.