FREE STUDY NOTES · DP-900

ACID transactions explained: atomicity, consistency, isolation and durability

What each ACID property guarantees in a transactional (OLTP) database, with the classic funds-transfer example.

From Ultra Transcenders DP-900 by Tony Rough (publishing soon)

The value of a transactional system lies in its guarantees. OLTP systems enforce transactions with ACID semantics, named after four properties: atomicity, consistency, isolation and durability.

Learn’s illustration is a bank transfer. Account A starts with a balance of 100 and account B with 50, and 40 is to be moved from A to B. The system must debit A and credit B as a single, reliable operation. Each ACID property describes one way that operation is protected.

Property Guarantee In the bank transfer
Atomicity All or nothing Debit and credit both happen, or neither does
Consistency Valid state to valid state Completed transfer shows 40 moved from A to B
Isolation Concurrent transactions don’t see each other’s unfinished work A balance check never mixes a before value for one account with an after value for the other
Durability Committed changes survive failure The new balances remain after the system is switched off and on

Common trap: Mixing up consistency and isolation - consistency is about each transaction moving the data from one valid state to another; isolation is about transactions running at the same time not seeing each other’s half-finished work, such as a balance check during a transfer.

Common trap: Assuming ACID guarantees are only available in relational databases - Learn’s OLTP guidance notes that Azure Cosmos DB, a non-relational service, provides ACID guarantees through transactional batch operations within a logical partition.

Get the whole book

This note is one section of Ultra Transcenders DP-900: Microsoft Azure Data Fundamentals, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.

Amazon.co.ukKindle: coming soonPaperback: coming soon
Amazon.comKindle: coming soonPaperback: coming soon

Publishing soon on Amazon in Kindle and paperback editions.

About the book · DP-900 terms in the glossary · All DP-900 study notes

More DP-900 study notes