0
0
DBMS Theoryknowledge~5 mins

Timestamp-based protocols in DBMS Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of timestamp-based protocols in databases?
Timestamp-based protocols help manage the order of transactions to avoid conflicts and ensure consistency by using timestamps to decide which transaction should proceed.
Click to reveal answer
beginner
How does a timestamp determine the order of transactions?
Each transaction is given a unique timestamp when it starts. Transactions with smaller timestamps are considered older and get priority over newer ones.
Click to reveal answer
intermediate
What happens if a transaction tries to access data that conflicts with a newer transaction in timestamp-based protocols?
The older transaction may be rolled back or delayed to maintain the correct order, preventing conflicts and ensuring data consistency.
Click to reveal answer
intermediate
Explain the difference between read and write timestamps in timestamp-based protocols.
Read timestamp records the last time data was read, and write timestamp records the last time data was written. These help decide if a transaction can safely read or write data without conflicts.
Click to reveal answer
advanced
Why are timestamp-based protocols considered non-locking concurrency control methods?
Because they do not use locks to control access but rely on timestamps to order transactions, reducing waiting times and deadlocks.
Click to reveal answer
What does a smaller timestamp indicate in timestamp-based protocols?
AAn older transaction
BA newer transaction
CA transaction with higher priority to write
DA transaction that must be rolled back
In timestamp-based protocols, what happens if a transaction tries to write data that has been read by a newer transaction?
AThe newer transaction is rolled back
BThe write is allowed immediately
CThe transaction is rolled back
DBoth transactions proceed simultaneously
Which of the following is NOT a feature of timestamp-based protocols?
AAssigning unique timestamps to transactions
BUse of locks to control access
COrdering transactions by timestamp
DAvoiding deadlocks
What do read and write timestamps help determine?
AIf a transaction can safely read or write data
BThe size of the transaction
CWhen to commit a transaction
DThe priority of the database server
Why might a transaction be rolled back in timestamp-based protocols?
ABecause it has the newest timestamp
BBecause it completed successfully
CBecause it requested a lock
DBecause it conflicts with the order of timestamps
Describe how timestamp-based protocols use timestamps to manage transaction order and avoid conflicts.
Think about how the system decides which transaction goes first.
You got /4 concepts.
    Explain the role of read and write timestamps in timestamp-based concurrency control.
    Consider how the system knows if data access is safe.
    You got /4 concepts.