Databases & SQL interview questions
Show answer
Atomicity (all or nothing), Consistency (constraints hold), Isolation (concurrent transactions do not see each other's partial work), Durability (committed data survives crashes). Use a transaction whenever several writes must succeed or fail together, for example creating an order and reducing stock.