week 10
10.2 ACID Properties
The four ACID properties guarantee reliable transaction processing in a DBMS:
|
ACID Property |
Definition and Banking Example |
|
ATOMICITY |
A transaction is treated as a single indivisible unit — it either completes fully (COMMIT) or has no effect (ROLLBACK). In the bank transfer: if the credit to Ngozi fails, the debit from Amina is automatically rolled back. |
|
CONSISTENCY |
A transaction brings the database from one valid state to another valid state. All integrity constraints must be satisfied before and after. E.g., bank balances must never go negative (if that's a constraint), and total money in the system is conserved. |
|
ISOLATION |
Concurrent transactions execute as if they were serial (one at a time). One transaction's intermediate results are not visible to others. E.g., while the transfer is in progress, neither Amina nor Ngozi's balances should show half-updated values. |
|
DURABILITY |
Once a transaction is committed, its changes are permanent — even if the system crashes immediately after. The ₦10,000 transfer is permanent once COMMIT executes. A power cut cannot undo it. |