Skip to content

ACID properties in DBMS with examples

ACID properties in DBMS are the four key properties that guarantee the reliability of a database system. These properties are essential for ensuring that the database transactions are processed reliably and consistently. In this article, we will discuss the ACID properties in DBMS with examples.

Atomicity

A transaction is treated as a single, indivisible unit of work. It must either be fully completed or not executed at all.

Example: If a transaction involves transferring money from one bank account to another, both the debit and credit operations must succeed. If one part fails, the entire transaction is rolled back.

Consistency

Ensures that a transaction takes the database from one valid state to another valid state, maintaining all integrity constraints.

For example: In a bank system, account balances should never be negative. If a transaction violates this rule, it must be aborted or corrected

Isolation

Ensures that transactions are executed independently of one another, without interference. Intermediate states are not visible to other concurrent transactions.

For example: Two users withdrawing money from the same account simultaneously should not see each other’s incomplete transactions or cause data inconsistencies.

Durability

Once a transaction is committed, its changes must be permanently stored, even if the system crashes.

After transferring money and receiving a confirmation, the change should persist even if the database server crashes immediately afterward.