ACID Compliance & Transactions

ACID TRANSACTION refers to atomicity, consistency, isolation and durability. ACID transactions are implemented globally across all high performance, highly available, highly consistent and mission critical systems like banking, government processes, business process, healthcare processes and much more.

ACID Database Transactions ensure consistency and availability during errors, power failure, system failure and network errors.

Acid transaction are:

-> Atomic in nature
-> Consistent in nature
-> Isolated in nature
-> Durable in nature

Atomic : refers to all the CRUD operations being  performed as a single operation, all the transactions are considered as a single unit, if any step in a transaction fails the whole transaction will fail thus resulting in unchanged state, DB operations which are RDBMS based are acid complaint, because ACID principle ensure ATOMIC, CONSISTENT, ISOLATED and DURABLE transactions which result in low latency, higher reliability and data consistency.

USE CASES :

  • In banking if you make a FD then the amount is deducted from your saving account and then it is transferred to the borrowing account FD ACCOUNT, firstly the Debit is done from the account, then credit is done in the borrowing account (FD ACCOUNT).
  • if amount is debited and sent from your account then the amount needs to be credited to the recipient account. Both the debit and credit transitions will be done together, else non of this will be executed.

Consistency : It refers to the data that is kept in consistent state throughout the execution and the end of the transaction, All the data is same during same time to the end user , hence data consistency is managed across all the nodes at all given point of time to ensures high level of consistency.

For eg if you withdraw money from an ATM and the amount is debited out, then the balance will be deducted as money is being debited, by you and hence you visit another ATM and Swipe the card, the balance data is going to be same, no matter you visit any amount of ATMs, the data is consistent across all the banking servers hence maintaining high availability, high durability and high level of data consistency.

Isolation : The state of all the transactions are kept isolated with each other, transaction which are run concurrently are appeared to be serialized. Isolation of CRUD processes ensures effective resources utilization and efficient execution.

Durability : Once the set of transactions are done or executed, the data state remains same till changes are being made, the processes which are carried out in a transaction need to provide certain level of consistency and durability in order to ensure good output experience, hence in RDMBS durability is higher as the quality of data transmission is consistent. The updated state remains same till changes are being made, the transactions made shall not be reversed, hence this ensure high level of Durability.

A—> ATOMIC
C—> CONSISTENCY
I —> ISOLATION
D—> DURABILITY

Acid transactions ensures high level of consistency, reliability and integrity. Inconsistent data state is a BIG no-no when it comes to ACID Transactions.

History : in 1983 the term ACID was framed, the foundation was laid down by JIM GRAY , who was able to frame, atomicity, consistency , durability, isolation.

The article above is rendered by integrating outputs of 1 HUMAN AGENT & 3 AI AGENTS, an amalgamation of HGI and AI to serve technology education globally.

(Article By : Himanshu N)