Concurrency Control

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

Concurrency Control

Ensures correct execution of concurrent transactions without conflicts

2
New cards

Goal of Concurrency Control

Preserve database consistency and isolation of transactions

3
New cards

Conflicts

Read-Write, Write-Read, Write-Write conflicts occur on same data items

4
New cards

Serializability

Concurrent schedule equivalent to some serial execution order

5
New cards

Conflict Serializability

Schedule can be transformed into a serial one by swapping non-conflicting operations

6
New cards

View Serializability

Based on equivalence of reads and writes, more general than conflict serializability

7
New cards

Two-Phase Locking (2PL)

Acquire all locks before releasing any; guarantees conflict serializability

8
New cards

Strict 2PL

Releases all locks only after commit or abort; ensures recoverability

9
New cards

Deadlock

A cycle in wait-for graph causing transactions to wait indefinitely

10
New cards

Deadlock Detection

Uses wait-for graph to detect cycles and resolve by aborting transactions

11
New cards

Deadlock Prevention

Prevents deadlocks by ordering lock acquisition or timeout

12
New cards

Lock Types

Shared (S) locks for read, Exclusive (X) locks for write

13
New cards

Lock Compatibility

Shared locks compatible with other shared locks, exclusive locks are not compatible

14
New cards

Timestamp Ordering

Assigns timestamps to transactions to serialize by timestamp order

15
New cards

Optimistic Concurrency Control

Transactions execute without locks, validate before commit

16
New cards

Multiversion Concurrency Control (MVCC)

Maintains multiple versions of data for better read concurrency

17
New cards

Phantom Problem

Occurs when new rows match a predicate in between repeated reads

18
New cards

Isolation Levels

Define allowed anomalies: Read Uncommitted, Read Committed, Repeatable Read, Serializable

19
New cards

Granularity of Locks

Can be at row, page, table, or database level; finer granularity increases concurrency

20
New cards