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
Complete the following learning activities: (3–3.25 hours total)
- Read Fundamentals of Database Management Systems Chapter 11: Database Control Issues: Security, Backup and Recovery, Concurrency (60 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
- Attend the class meeting
(60 minutes)
- Complete the handout on data anomalies (20–30 minutes)
- Optional: Watch Crazy Concurrency (3 minutes)
- Continue work on the project website
(60–75 minutes)
- Complete the implementation of additional pages
- Create a consistent theme for the site (using CSS)
Resources
- Intro to Transactions (7 minutes)
- Examples and Problems
(7 minutes)
- Note: This video uses the term inconsistent read instead of nonrepeatable read
- Serializability (6 minutes)
- ACID Properties of Transactions (8 minutes)