Think of a Bank Transfer like teleporting money.
Atomicity (All or Nothing): The money disappears from A and appears in B. It shouldn't get lost in hyperspace. If the teleport fails halfway, the money should reappear in A.
Consistency (Rules): You can't transfer more money than you have. The laws of physics (Database Constraints) still apply.
Isolation (Privacy): If two people try to grab the same dollar bill at the exact same microsecond, they shouldn't tear it in half. They wait in line.
Durability (Saved Forever): Once the teleport is confirmed, even if an asteroid hits the bank, the record of the new balance must survive (on a hard drive).
Imagine sending money. You want the money to leave your account AND arrive at the other side. You don't want it to vanish in mid-air if the server crashes.
Bank Transfer: "Debit A, Credit B". Atomicity says: Do BOTH, or do NEITHER. No halfway states allowed.
All or Nothing
Rules are Sacred
Queue, don't crowd
Saved forever
"Which property ensures "all or nothing"?"
Atomicity.