ACID properties in Relation database

ACID properties are a set of properties that intended to guarantee validity even in the event of an error, power failure, etc.

ACID is shorthand for Atomicity, Consistency, Isolation, and Durability. In the context of the database, a sequence of database operations that satisfies the ACID properties is called a transaction.

ACID properties

Atomicity: Transaction is often composed of multiple statements. Atomicity guarantee that each transaction is treated as a single unit, which either successes completely or fails. In any of the statements consisting of transactions that fail to complete the entire transaction failed and the database left unchanged.

Consistency: Consistency ensures that a transaction can only bring the database from one valid state to another valid state. Any data writes to the database must be valid according to all defined rules including constraints, cascades, and triggers. Consistency ensures the data saved into the database is valid but it does not guarantee that a transaction is complete.

Isolation: Isolation generally refers to separation but in terms of database, isolation ensures that the concurrent execution of the transactions does not corrupt the data.

Durability: Durability as the name suggest that once a transaction is committed, the data will remain committed even in case of system failure. This often means that the completed transactions are recorded in non-volatile memory.

Recommended Read

The N+1 Query Problem example with hibernate
Hibernate Architecture

happy Learning !!

Leave a Comment