ACID Properties
If databases only supported a single user at a time, they wouldn’t be very useful. In fact, most databases support concurrent access by hundreds of users! A database transaction represents a single unit of work and is independent of other transactions that may be running concurrently. This lesson describes the data anomalies that arise without transactions, the ACID properties to prevent those anomalies, and SQL’s transaction isolation levels.
Learning Objectives
- Describe the following data anomalies:
- lost update
- dirty read
- nonrepeatable read
- phantom read
- Define the following terms:
- Atomicity
- Consistency
- Isolation
- Durability
- Describe the following transaction isolation levels
- read uncommitted
- read committed
- repeatable read
- serializable
- Describe techniques used by relational databases to provide the ACID properties
How to Complete this Lesson
- Read Fundamentals of Database Management Systems Chapter 11: Database Control Issues: Security, Backup and Recovery, Concurrency (60 minutes)
- Watch Intro to Transactions (7 minutes)
- Watch Examples and Problems
(7 minutes)
- Note: This video uses the term inconsistent read instead of nonrepeatable read
- Complete the handout on data anomalies (20–30 minutes)
- Watch Serializability (6 minutes)
- Read the introduction to Transaction Isolation
(5 minutes)
- Note: You do not need to read the subsections – just the beginning of the section in the documentation
- Watch ACID Properties of Transactions (8 minutes)
- Respond to one of the prompts in the discussion forum (30 minutes)
- Optional: Watch Crazy Concurrency (3 minutes)
- Start the programming portion of the B+ tree
assignment
(30 minutes)
- Find a partner and accept the GitHub Classroom assignment
- Implement the
find
operation
Due
As a reminder, the following is due this lesson: