ACID Transactions
Ahmed Helmy
Ahmed Helmy
Software Developer at Health.Links | Full Stack Developer | PHP, Laravel, JS, Node.js
What is a transaction?
A transaction is a collection of SQL queries that are treated as a single unit.
A transaction can contain different types of queries, such as SELECT and UPDATE.
A.C.I.D. Properties
(Atomicity, Consistency, Isolation, and Durability)
ACID properties are a set of rules that ensure transactions are executed correctly.
Atomicity
All operations within a transaction are either fully executed or not executed at all.
Consistency
A transaction moves the database from one consistent state to the next.
Isolation
Transactions should not interfere with each other.
Durability
transaction must be persisted in a durable non-volatile storage. Once a transaction is successful, the data should not be lost.