ACID Properties
ACID Properties is a SQL statement in the Transactions category. ACID properties define reliable transaction processing. A database must satisfy all four for each transaction. The syntax is -- ACID: Atomicity, Consistency, Isolation, Durability — the four guarantees of database transactions.. It returns database reliability principles. A typical example: -- Atomicity: All or nothing -- If a transaction has 2 UPDATEs and the second fails, the first is rolled back -- Consistency: Data is valid before and after -- Constraints (FK, CHECK, UNIQUE) are always maintained -- Isolation: Concurrent transactions don't interfere -- SERIALIZABLE = highest isolation, READ UNCOMMITTED = lowest -- Durability: Committed data is permanent -- Even after power loss, committed transactions survive -- Guaranteed by Write-Ahead… A close relative is BEGIN / START TRANSACTION, which begins a new transaction. Changes made within are invisible to others until COMMIT. A close relative is COMMIT, which saves all changes made in the current transaction permanently.