Explore tens of thousands of sets crafted by our community.
Concurrency Control in Databases
10
Flashcards
0/10
Locking
Locking prevents multiple processes from accessing the same data at the same time, thus avoiding conflicts and ensuring data integrity.
Two-Phase Locking (2PL)
A protocol that ensures serializability by acquiring all locks before any lock is released. The transaction goes through two phases: growing and shrinking.
Dirty Read
A scenario in which a transaction reads data written by another transaction that has not yet committed, leading to potential inconsistencies if the other transaction is rolled back.
Timestamp Ordering
This method assigns a unique timestamp to each transaction, ensuring that transactions proceed in timestamp order, maintaining the serializability of transactions.
Read Committed Isolation Level
An isolation level that prevents Dirty Reads by ensuring that a transaction can only read data that has been committed by others, though it does not prevent Non-Repeatable Reads or Phantom Reads.
Multiversion Concurrency Control (MVCC)
A method that allows reads to occur without blocking writes by keeping multiple versions of a data item.
Serializable Isolation Level
This is the highest level of isolation in databases, which prevents Dirty Reads, Non-Repeatable Reads, and Phantom Reads, ensuring transactions are completely isolated from each other.
Deadlock Detection
An approach to handle deadlocks by periodically checking for cycles in a wait-for graph and resolving them by aborting one of the transactions.
Optimistic Concurrency Control
Assumes that conflicts are rare and only checks for conflicts at transaction commit times. It uses a validation phase to ensure serializability.
Snapshot Isolation
A type of concurrency control where a transaction works with a consistent snapshot of the data as it was at the start of the transaction to avoid reading uncommitted changes.
© Hypatia.Tech. 2024 All rights reserved.