ACID properties in DBMS

Saurav Kumar
3 min readNov 17, 2023

ACID is an acronym that stands for Atomicity, Consistency, Isolation, and Durability. These properties are crucial in the context of database management systems (DBMS) to ensure the reliability and integrity of transactions. Let’s explore each of these properties in more detail:

Atomicity:

  • Definition: Atomicity ensures that a transaction is treated as a single, indivisible unit of work. Either all the changes made by the transaction are committed to the database, or none of them are.
  • Scenario: Funds Transfer in a Bank
  • Transaction Steps:
  1. Deduct funds from Account A.
  2. Credit the same amount to Account B.
  • Atomicity Ensures:
  • If step 1 succeeds but step 2 fails (e.g., due to a system crash), atomicity ensures that the entire transaction is rolled back.
  • If step 1 fails, no changes are made to either account.

Example: Consider a funds transfer between two bank accounts. If the debit from one account occurs successfully but the credit to the other account fails, atomicity ensures that the entire transaction is rolled back, and both accounts return to their original state.

Consistency:

  • Definition: Consistency ensures…

--

--

Saurav Kumar
Saurav Kumar

Written by Saurav Kumar

Experienced Software Engineer adept in Java, Spring Boot, Microservices, Kafka & Azure.

No responses yet