0% found this document useful (0 votes)
3 views3 pages

DBMS_2

The document discusses the ACID properties of Database Management Systems (DBMS), which are essential for ensuring data integrity, reliability, and consistency during transactions. It details each property: Atomicity ensures transactions are all or nothing, Consistency maintains valid states, Isolation prevents interference between simultaneous transactions, and Durability guarantees permanent changes. These properties are crucial in sectors like banking and e-commerce where accurate and secure transactions are vital.

Uploaded by

Ayush Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

DBMS_2

The document discusses the ACID properties of Database Management Systems (DBMS), which are essential for ensuring data integrity, reliability, and consistency during transactions. It details each property: Atomicity ensures transactions are all or nothing, Consistency maintains valid states, Isolation prevents interference between simultaneous transactions, and Durability guarantees permanent changes. These properties are crucial in sectors like banking and e-commerce where accurate and secure transactions are vital.

Uploaded by

Ayush Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DBMS-2

Ayush Gupta
April 2025

1 Introduction
In a Database Management System (DBMS), ACID properties ensure data in-
tegrity, reliability, and consistency during transactions. ACID stands for:

• Atomicity – ”All or Nothing”

• Consistency – ”Valid State Before & After”


• Isolation – ”No Interference Between Transactions”
• Durability – ”Permanent Changes”

2 ACID Properties in Detail


2.1 Atomicity (All or Nothing)
Definition: A transaction must be fully completed or fully rolled back if any
part of it fails.
Real-Life Example (Bank Transfer): Suppose you are transferring 5000
from Account A to Account B. The transaction has two steps:

1. Deduct 5000 from Account A.


2. Add 5000 to Account B.
If a system crash happens after step 1, then money is deducted from A but not
added to B, leading to inconsistency. Atomicity ensures that either both steps
happen together, or none happen. If an error occurs, the transaction is rolled
back, so A still has 5000.

2.2 Consistency (Valid State Before & After)


Definition: The database must remain in a consistent state before and after a
transaction. No transaction should leave the database in an invalid state.

1
Real-Life Example (Bank Account Balance Rules): Let’s say the
bank enforces a rule: ”Account balance cannot be negative.” Before the trans-
action, A has 5000. If A tries to transfer 6000 (which is more than its balance),
consistency prevents this transaction from happening, ensuring the rule is main-
tained. If an invalid transaction violates the rules, it is rolled back to maintain
consistency.

2.3 Isolation (No Interference Between Transactions)


Definition: If multiple transactions occur simultaneously, they should not in-
terfere with each other.
Real-Life Example (Multiple People Withdrawing from ATM):
Imagine two people, X and Y, try to withdraw 5000 from the same Account A
(8000 balance) at the same time from different ATMs.
Without Isolation (Problem: Race Condition)
• X’s transaction reads balance: 8000

• Y’s transaction reads balance: 8000


• Both try to withdraw 5000 ⇒ Both succeed, leaving 3000 (which is in-
correct!).
With Isolation: The DBMS processes one transaction at a time, ensuring
correct results:
• X’s transaction runs first: 8000 - 5000 = 3000 remaining.
• Now Y’s transaction starts but sees only 3000, so it fails or adjusts the
withdrawal.

Thus, isolation prevents interference and ensures correct execution.

2.4 Durability (Permanent Changes)


Definition: Once a transaction is committed, the changes must be permanently
stored in the database, even if the system crashes.
Real-Life Example (Fixed Deposit in a Bank):
• You deposit 50,000 in a fixed deposit (FD).
• The bank system records this deposit.

• Suddenly, the system crashes.


• After recovery, the deposit must still be recorded in the database.
Durability ensures that once the system confirms the deposit, it cannot be lost,
even in case of a failure.

2
3 Conclusion: Why ACID is Important?
ACID properties ensure:
• Reliability (Data is always correct)
• Integrity (No partial updates)
• Security (No unauthorized changes)

• Consistency (No rule violations)


They are critical for banks, e-commerce, stock trading, etc., where transactions
must be accurate, isolated, and durable.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy