Save
...
10.0 Fundamentals of databases
10.4 Transactions and concurrency
10.4.2 Concurrency control
Save
Share
Learn
Content
Leaderboard
Share
Learn
Cards (230)
What is the purpose of concurrency control in database management?
Ensure data integrity
Concurrency control is necessary to prevent transactions from interfering with each other, which could lead to
data errors
.
One common concurrency control technique is
locking
Match the lock type with its purpose:
Exclusive lock ↔️ Allows only one write
Shared lock ↔️ Allows multiple reads
What does time-stamping involve in concurrency control?
Assigning unique time-stamps
Order the steps in applying locking for concurrency control:
1️⃣ Transaction requests lock on data item
2️⃣ Lock is granted if available
3️⃣ Transaction modifies data
4️⃣ Transaction releases lock
Time-stamping avoids deadlocks but requires more complex
implementation
Lost updates occur when multiple transactions modify the same data concurrently, and one transaction's updates are
overwritten
by another.
What is the primary cause of inconsistent data in concurrent database access?
Reading partially updated data
Deadlocks occur when two or more transactions are blocked indefinitely, each waiting for the other to release a
resource
Concurrency control mechanisms are essential to prevent deadlocks and ensure reliable
database operations
.
Match the type of lock with its description:
Exclusive lock ↔️ Allows only one transaction to write
Shared lock ↔️ Allows multiple transactions to read
What happens when Transaction 2 tries to read Table A while Transaction 1 holds an exclusive lock on it?
Transaction 2 is blocked
Two common concurrency control techniques are locking and
time-stamping
What are two common techniques for concurrency control in a database?
Locking and time-stamping
Locking involves placing
locks
on data items to prevent other transactions from accessing them.
Exclusive locks allow multiple transactions to write simultaneously.
False
What type of lock allows multiple transactions to read a data item concurrently?
Shared lock
Time-stamping assigns unique
time-stamps
to each transaction to ensure consistency.
Time-stamping avoids deadlocks in
database
concurrency control.
A disadvantage of locking is that it can lead to
deadlocks
and longer transaction waits.
Time-stamping has lower overhead than locking in managing concurrent transactions.
False
Order the challenges of concurrent database access from most to least severe:
1️⃣ Deadlocks
2️⃣ Inconsistent data
3️⃣ Lost updates
Concurrency control techniques are designed to prevent lost updates, inconsistent data, and deadlocks in
databases
.
What are the primary challenges mitigated by concurrency control techniques?
Lost updates, inconsistent data, deadlocks
Two common concurrency control techniques are
locking
and time-stamping
What is the purpose of exclusive locks in locking mechanisms?
Allow only one write
Shared locks allow multiple transactions to read data items
concurrently
.
How does timestamping ensure data consistency in concurrent transactions?
Validates reads and writes
Timestamping avoids deadlocks but has the disadvantage of managing
timestamps
Match the concurrency control technique with its advantage:
Locking ↔️ Ensures high data integrity
Timestamping ↔️ Avoids deadlocks
Concurrency control techniques aim to prevent lost updates and deadlocks in
databases
.
What is the primary goal of concurrency control in database management?
Maintain data integrity
Concurrency control maintains data integrity by coordinating concurrent
access
Lost updates occur when multiple transactions modify the same data
concurrently
, and one update is overwritten.
What is the cause of inconsistent data in concurrent database access?
Reading partially updated data
Deadlocks occur when two or more transactions are blocked indefinitely, waiting for each other to release a
resource
Match the concurrency challenge with its mitigation:
Lost Updates ↔️ Locking
Inconsistent Data ↔️ Locking, Timestamping
Deadlocks ↔️ Locking, Deadlock Detection
What are the two primary types of locks used in locking mechanisms?
Exclusive and Shared
Locking mechanisms prevent multiple transactions from simultaneously
modifying
the same data.
See all 230 cards
See similar decks
10.4.2 Concurrency control
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
51 cards
10.4.2 Concurrency control
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
27 cards
10.4.2 Concurrency control
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
27 cards
10.4.2 Concurrency control
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
65 cards
10.4.2 Concurrency control
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
27 cards
10.4.2 Concurrency control
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
96 cards
10.4 Transactions and concurrency
AQA A-Level Computer Science > 10.0 Fundamentals of databases
266 cards
10.4.1 ACID properties
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.4 Transactions and concurrency
36 cards
10.2.2 Normalization
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.2 Relational databases
113 cards
10.1 Database concepts
AQA A-Level Computer Science > 10.0 Fundamentals of databases
99 cards
10.1.2 Database management systems (DBMS)
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.1 Database concepts
74 cards
10.2 Relational databases
AQA A-Level Computer Science > 10.0 Fundamentals of databases
143 cards
10.1.1 Data models
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.1 Database concepts
25 cards
10.0 Fundamentals of databases
AQA A-Level Computer Science
743 cards
10.2.1 Tables, records, and fields
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.2 Relational databases
30 cards
10.3 Structured Query Language (SQL)
AQA A-Level Computer Science > 10.0 Fundamentals of databases
235 cards
10.3.2 Data manipulation language (DML)
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.3 Structured Query Language (SQL)
136 cards
10.3.1 Data definition language (DDL)
AQA A-Level Computer Science > 10.0 Fundamentals of databases > 10.3 Structured Query Language (SQL)
99 cards
AQA A-Level Computer Science
5135 cards
OCR A-Level Computer Science
2091 cards
1.0 Fundamentals of programming
AQA A-Level Computer Science
374 cards