Explore tens of thousands of sets crafted by our community.
Database Locking Mechanisms
8
Flashcards
0/8
Two-Phase Locking (2PL)
Guarantees serializability by acquiring all locks before any are released. Use for maintaining transaction consistency.
Time Stamp Ordering
Assigns timestamps to ensure transactions are processed in a certain order. Use to avoid serialization anomalies.
Serializable Isolation
Ensures transactions execute with the same effect as if they were executed serially. Use when absolute consistency is necessary.
Pessimistic Locking
Locks data when a transaction begins to prevent concurrent modifications. Use when high contention is expected.
Read Committed Isolation
Allows reading only committed data, preventing dirty reads. Use this in databases where reading uncommitted data is not acceptable.
Multiple Granularity
Allows transactions to lock resources at various levels of granularity. Use for efficiency when transactions need various types of access to data.
Deadlock Detection
Algorithm to identify deadlocks. Use when deadlock prevention is not feasible or practical.
Optimistic Locking
Assumes multiple transactions can complete without affecting each other, and checks at commit time. Use when read operations are more common than writes.
© Hypatia.Tech. 2024 All rights reserved.