Questions
1–2 descriptive questions per university exam paper
Difficulty
Medium
Importance
High yield for DBMS core module and semester exams
Overview
Transactions and Concurrency form the bedrock of Database Management Systems, ensuring data integrity in multi-user environments. Mastering these concepts is essential for university exams as they bridge the gap between simple data storage and robust, real-world application architecture.
ACID Properties
The ACID properties serve as a blueprint for transaction reliability in database systems. Every student must clearly define and distinguish between Atomicity, Consistency, Isolation, and Durability to answer standard descriptive questions.
- Atomicity: All-or-nothing execution policy.
- Consistency: DB moves from one valid state to another.
- Isolation: Concurrent transactions do not interfere with each other.
- Durability: Committed changes survive system failures.
Concurrency Control Techniques
Concurrency control manages simultaneous operations to prevent inconsistencies such as lost updates or uncommitted dependencies. Exam questions frequently focus on the implementation of locking mechanisms and timestamp ordering.
- Locking Protocols: Shared (S) and Exclusive (X) locks.
- Two-Phase Locking (2PL): Growing phase and shrinking phase.
- Timestamp Ordering: Serializability based on arrival time.
- Optimistic Concurrency Control: Read-Validate-Write phases.
Deadlock Handling
Deadlocks occur when two or more transactions are waiting indefinitely for resources held by each other. Understanding detection, prevention, and avoidance strategies is crucial for practical system design questions.
- Detection: Using Wait-For Graphs (WFG).
- Prevention: Wait-Die and Wound-Wait schemes.
- Avoidance: Banker's Algorithm for resource allocation.
- Recovery: Choosing a victim transaction and rolling it back.
Formula Sheet
S-lock (Shared): Allows read operations.
X-lock (Exclusive): Allows read and write operations.
Wait-Die: Older transaction waits, younger transaction dies.
Wound-Wait: Older transaction preempts (wounds) younger transaction.
Exam Tip
Always provide the Wait-For Graph diagram when discussing deadlocks, as visual representations significantly increase marks in university theory exams.
Common Mistakes
- Confusing the Growing and Shrinking phases in 2PL by allowing locks to be acquired after a release.
- Neglecting the difference between 'deadlock prevention' and 'deadlock detection' methods.
- Failing to mention that Serializability is the ultimate objective of concurrency control.
More Revision Notes
Ready to test yourself?
Play topic-wise Transactions & Concurrency questions in Aspirant Arcade — gamified MCQ practice.
Download Free