Transactions and Concurrency
A variety of implementation strategies exist to guarantee that database transactions satisfy the ACID properties. One of the simplest uses locks to prevent concurrent modification of data that has been read by a transaction. Because deadlock may ensue when when multiple transactions are waiting for the same resource(s), several protocols exist to enforce isolation among transactions while minimizing the likelihood of deadlocks.
Learning Objectives
- List the necessary conditions for deadlock
- Describe how database management systems (DBMSs) use locks to ensure isolation among transactions
- Describe the two-phase locking protocol and strict two-phase locking
- Create a serializable schedule using the aforementioned locking protocols
How to Complete this Lesson
- Recommended: Complete the optional homework on database control issues (30 minutes)
- Reply to one of your classmates’ posts in the discussion forum (30 minutes)
- Watch The Transaction Model (5 minutes)
- Read Deadlock (10–15 minutes)
- Watch Deadlock Scenarios and Prevention (4 minutes)
- Watch Deadlock Avoidance (3 minutes)
- Watch Deadlock Detection and Resolution (3 minutes)
- Watch Two Phase Locking (4 minutes)
- Watch Strict 2PL (2 minutes)
- Complete the handout (10–20 minutes)
- Take the quiz
- Continue working on the programming portion of the B+ tree
assignment
(60 minutes)
- Implement the
insert
operation - Verify that the tests that only include insert operations pass
- Implement the
Due
As a reminder, the following are due this lesson: