What is ACID?
ACID properties guarantee that database transactions are processed reliably. This is a favorite topic in both GATE exams and backend developer interviews.
- Atomicity: "All or nothing." If part of a transaction fails, the entire transaction fails, and the database state is left unchanged.
- Consistency: Ensures that a transaction can only bring the database from one valid state to another.
- Isolation: Concurrent execution of transactions leaves the database in the same state as if the transactions were executed sequentially. (Read uncommitted, Read committed, Repeatable read, Serializable).
- Durability: Once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors.