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

  1. Recommended: Complete the optional homework on database control issues (30 minutes)
  2. Reply to one of your classmates’ posts in the discussion forum (30 minutes)
  3. Watch The Transaction Model (5 minutes)
  4. Read Deadlock (10–15 minutes)
  5. Watch Deadlock Scenarios and Prevention (4 minutes)
  6. Watch Deadlock Avoidance (3 minutes)
  7. Watch Deadlock Detection and Resolution (3 minutes)
  8. Watch Two Phase Locking (4 minutes)
  9. Watch Strict 2PL (2 minutes)
  10. Complete the handout (10–20 minutes)
  11. Take the quiz
  12. 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

Due

As a reminder, the following are due this lesson: