A transaction is a single logical unit of work which accesses and possibly modifies the contents of a database. Transactions access data by performing read and write operations. To maintain the correctness of the database, each transaction must preserve certain properties before and after its execution. These are collectively known as the ACID properties.

Atomicity means a transaction is indivisible: it either completes fully (commits) or has no effect at all (aborts and rolls back). There is no partial completion visible to other transactions or to the database.
Atomicity is often described as the "all-or-nothing" rule.
Example (simple money transfer): Consider a transaction T that transfers 100 from account X to account Y. If T is split into two operations T1: debit X and T2: credit Y, and the system fails after T1 but before T2 (for example, after write(X) but before write(Y)), the database will be left inconsistent unless atomicity is enforced. Either both T1 and T2 must appear to have happened, or none.

Common implementation techniques that enforce atomicity:
Consistency requires that a transaction, when executed in isolation on a consistent database, will produce another consistent database by preserving all declared integrity constraints (primary key, foreign key, domain constraints, and application-specific rules).
Consistency is a property of the combined DBMS and transaction logic: the DBMS provides mechanisms (constraints, triggers) while the transaction's code must be correct to maintain invariants.
Example (from the transfer): Suppose before the transfer the balances are X = 500 and Y = 200, so total = 700. After a correct transfer of 100 from X to Y, balances should be X = 400 and Y = 300, total = 700. If a failure causes only the debit to be written, total will no longer match the invariant, producing an inconsistent state.
Isolation requires that concurrent transactions do not interfere and that the final state is the same as some serial execution of those transactions. Isolation prevents anomalies produced by interleaved operations.
Common concurrency anomalies:
Example (interleaving causing inconsistency): Let X = 50,000 and Y = 500. Transaction T transfers 50 from X to Y. If T performs write(X) (debit) and then is paused, and another transaction T'' reads both X and Y, it may see the updated X but the old Y. If T'' computes the sum X+Y it will get a value 50 less than the correct total, causing an inconsistency visible to the user.
Concurrency control mechanisms that provide isolation:
Serialisability is the correctness criterion: a concurrent schedule is serialisable if its outcome is equivalent to some serial execution of the same transactions. Techniques to test or achieve serialisability include conflict-serialisability (conflict graphs) and view-serialisability.

Commercial DBMSs offer several isolation levels trading off strictness and performance. Typical levels are:
Choosing an isolation level is an engineering trade-off between throughput and correctness guarantees required by the application.
Durability ensures that once a transaction has committed, its effects persist permanently, even in case of system crashes, power failures, or other faults. Committed updates are stored in non-volatile storage and will be available after recovery.
Durability together with atomicity allows the system to recover to a state in which the effects of committed transactions are present and effects of uncommitted transactions are absent.
Recoverability concerns whether a schedule allows recovery without violating atomicity or consistency. Important definitions:
When a transaction spans multiple nodes or databases, atomicity is ensured by an atomic commit protocol, the common one being the Two-Phase Commit (2PC). 2PC has a coordinator and participants:
2PC ensures atomicity across distributed resources but can block if the coordinator fails; optimisations and non-blocking variants exist for production systems.
| 1. What are the ACID properties in DBMS? | ![]() |
| 2. How does Atomicity property ensure data integrity in DBMS? | ![]() |
| 3. What is the significance of the Consistency property in DBMS? | ![]() |
| 4. How does the Isolation property in DBMS handle concurrent transactions? | ![]() |
| 5. What is the role of the Durability property in DBMS? | ![]() |
![]() | Explore Courses for Computer Science Engineering (CSE) exam |
![]() | Get EduRev Notes directly in your Google search |