Ensures the cafe rules are followed (e.g., cappuccino = 1 espresso + 1 steamed milk). Mostly Handled By: ApplicationThe barista enforces higher-level rules like no wrong orders or duplicate entries.
Atomicity – Database is the Hero All or nothing: Either the cappuccino is fully made, or not served at all. Mostly Handled By: DatabaseThe cafe’s infrastructure ensures no half-served drinks using rollback mechanisms.
Isolation – Database’s Superpower Keeps orders separate: Customer 1’s milk doesn’t spill into Customer 2’s espresso. Mostly Handled By: DatabaseThe infrastructure ensures no interference through locking or queuing.
Durability – Database Guarantees It Your order is safe—even if the cafe loses power. Mostly Handled By: DatabaseDurability is ensured with backups (like write-ahead logs).