What is Transaction?
A sequence of database operations that are treated as a single unit — either all succeed or all are rolled back.
Transactions ensure data consistency through ACID properties: Atomicity (all or nothing), Consistency (valid state transitions), Isolation (concurrent transactions don't interfere), and Durability (committed data persists).
Commands include BEGIN/START TRANSACTION, COMMIT (save changes), and ROLLBACK (undo changes). Isolation levels (READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, SERIALIZABLE) balance consistency and performance.