ACID Properties

ACID Properties

Relational Database Management Systems (RDBMS) works based on the ACID properties. Let’s dive into each of these properties:

Transaction refers to a logical unit of work that performs one or more database operations

Atomicity

All or nothing

  • A transaction either happens completely or not at all.

Example,

Consider a bank transfer where money is being transferred from one account to another. If the credit operation succeeds, but the debit operation fails, the entire transaction will be rolled back to maintain atomicity.

Consistency

Ensures integrity constraints are maintained

  • at any cost, transaction won't violate any database constraints (PK, FK, data types).

Isolation

Transactions are isolated from each other.

in database, single records can't able to access 2 users.

Example ,

Durability

Once a transaction is committed, its changes are permanent

Data is persisted after a transaction is committed even in a system failure. In a distributed system, this means the data is replicated to some other nodes.

Â