Skip to main content

Command Palette

Search for a command to run...

ACID Properties in DBMS

Updated
3 min read
ACID Properties in DBMS
  • ACID properties are used to maintain consistency in the database before and after the transaction.

  • ACID properties provide stability in database loading and high security of the data.

ACID Properties

ACID Properties stands for-

  1. Atomicity

  2. Consistency

  3. Isolation

  4. Durability

Atomicity

It simply gives that a transaction is either "PASS" or " FAIL". There is no middle state in them like an update in their data. It also refers to the "All or Nothing "

For example :

Suppose, You are transferring money from your bank account to your friend's Bank account. This Transaction involves 'Withdrawal' and 'Deposit' operations. If the deposit operation failed, you don't want the Withdrawal operation to happen either. Otherwise, that money would disappear.

Lumping Both operations into a single atomic transaction ensures integrity. This is what is called the " Atomicity " in DBMS

Isolation

Isolation Property means multiple transactions can occur Concurrently Without any inconsistency in the database state.

  • That is when multiple transactions execute at a single unit of time, then the state of the database must be far all over the transaction period.

For example

Suppose you and your friend are booking a train ticket for Delhi and only one seat is available. Now, both of you simultaneously start booking the seat, which should not be allowed by the database management system, or else either of you will land in trouble. Maybe both will end up booking for the same seat or may be both will pay but only one will have the seat confirmed. Thus, the database should either perform your entire transaction first before executing your friend's or vise-versa.

Durability

The durability property ensures that once the transaction has been completed, The modifications and updates in the database are stored and they persist even if there is a system failure.

  • That is, some common external factors like system crashes or power failures should not affect the data once the transaction is completed

    in the server.

For example

Imagine you have a 10 lakh amount of money in your bank account. The bank database server goes down, all data stored on that server is gone and so your money is gone!!.

So you need Durability, a Fault free system. So Durability ensures the update and modification are stored in the database, even if a system failure occurs.

Consistency

In Consistency property, If any type of transaction exists at the user end, that must be conceived into a valid and legal state in the database.

That is, It ensures that the database remains in a consistent state before the start-up operation and after a transaction is over. If a transaction fails, the database must return to its previous state.

For example

Consistency means all is well, There is no Incorrectness anywhere in the system. If all the three mentioned above can be guaranteed then consistency prevails. There is no separate component in database management software that will ensure consistency.

..

Isolation Property means multiple transactions can occur Concurrently Without any inconsistency in the database state.

More from this blog

Naveen P.N's Tech Blog

94 posts