ACID properties in a Database Management System

Utkarsh Opalkar
2 min readSep 23, 2021

Certain rules/properties must be kept in mind when creating a DBMS if you want your DB product to become popular in the industry or among developers. These rules/properties ensure correctness, validity and reliability on the data that is stored into DBs via your DBMS product.

These rules are commonly abbreviated as ACID. They stand for:

A = Atomicity

C = Consistency

I = Isolation

D = Durability

Let’s take a closer look at what these terms actually mean in the context of a DB:

Transaction: a series of operations on data that are bundled into one single logical unit of work of data manipulation/access present in a DB.

A = Atomicity

Our DBMS should ensure that entire transaction gets executed as a whole until its last step which is Commit. If a failure occurs anywhere between starting the transaction and committing it, then all changes made for this particular transaction must also be reverted i.e. a Rollback must occur. In this case, the last step is Abort. None of these intermediate steps should reflect in the DB until after the Commit step is reached.

C = Consistency

We should ensure that the data before and after a transaction adds up and makes logical/arithmetic sense i.e. data must be Consistent before and after a transaction by upholding integrity of the data.

I = Isolation

Each transaction should be isolated from the others i.e. intermediate steps of one transaction are not seen by other transactions until a commit occurs. This means, multiple transactions may occur concurrently without breaking consistency or integrity of the data or transactions. Even though we know CPU gives cyclic time bursts to execute each transaction, to give us a false notion of parallel execution, two transactions accessing and manipulating the same data point should execute as though they are run sequentially one after the other i.e. Serially.

D = Durability

Once committed, a transaction should be persistently stored in the memory of our DBMS. These changes should not erroneously revert back or disappear. They should be written to the disk drive for example.

These properties are kind of interwoven with each other. Also, you may not notice them directly in your DBs but are present under the hood. They must be obeyed to ensure smooth management of data and preserve data integrity.

--

--

Utkarsh Opalkar

This CS life did not choose me, I chose this CS life. Hated it, ran from it, regretted it, but had to accept my choices, now falling in LOVE with CS for real!