Send a link to your students to track their progress
25 Terms
1
New cards
Concurrency control
A DBMS feature that coordinates simultaneous execution of transactions in a multi-user system while preserving data integrity.
2
New cards
Which ACID property does concurrency control mostly preserve
Isolation.
3
New cards
The three concurrency control problems
Lost update, uncommitted data (dirty read), inconsistent retrieval.
4
New cards
Lost update
A concurrency problem in which a data update is overwritten and lost during concurrent execution of transactions.
5
New cards
Uncommitted data (dirty read)
A concurrency problem in which a transaction reads data written by another transaction that later rolls back.
6
New cards
Inconsistent retrieval
A concurrency problem in which a transaction uses an aggregate function on data while other transactions are updating that data, producing incorrect aggregate results.
7
New cards
Scheduler
A DBMS component that establishes the order in which concurrent transaction operations are executed, interleaving them to ensure serializability.
8
New cards
Serializable schedule
A schedule of operations whose interleaved execution yields the same result as some serial execution.
9
New cards
Lock
A device that guarantees unique use of a data item for a particular transaction operation.
10
New cards
Pessimistic locking
Use of locks based on the assumption that conflicts between transactions will occur.
11
New cards
Lock manager
A DBMS component responsible for assigning and releasing locks.
12
New cards
Lock granularity
The level at which locks are applied: database, table, page, row, or field (broadest to most fine-grained).
13
New cards
Database-level lock
A lock that restricts database access to the lock owner; only one user at a time can use the database.
14
New cards
Table-level lock
A lock that allows only one transaction at a time to access a given table.
15
New cards
Page-level lock
A lock that restricts access to a disk page (a section of disk).
16
New cards
Row-level lock
A lock that allows concurrent transactions to access different rows of the same table, even if those rows live on the same page.
17
New cards
Field-level lock
A lock that allows concurrent transactions to access the same row but different fields; most flexible, highest overhead.
18
New cards
Trade-off as lock granularity gets finer
More concurrency, but higher overhead cost.
19
New cards
Binary lock
A lock with only two states: locked and unlocked.
20
New cards
Exclusive lock
A lock issued when a transaction requests permission to update a data item and no other locks are held on it.
21
New cards
Shared lock
A lock issued when a transaction requests permission to read a data item and no exclusive lock is held on it by another transaction.
22
New cards
Deadlock
A condition in which two or more transactions wait indefinitely for each other to release locks (also called a deadly embrace).
23
New cards
Deadlock prevention
A transaction requesting a lock is aborted if there is any chance of deadlock.
24
New cards
Deadlock detection
The DBMS periodically tests the database for deadlocks; if found, one transaction is aborted.
25
New cards
Deadlock avoidance
Transactions must obtain every lock they will need before being allowed to execute.