RDBMS Questions and Answers – Timestamp based Protocols

This set of Basic RDBMS Questions and Answers focuses on “Timestamp Based Protocols”.

1. Which of the following cannot be used to implement a timestamp
a) System clock
b) Logical counter
c) External time counter
d) None of the mentioned
View Answer

Answer: c
Explanation: An external time counter cannot be used to implement a timestamp. System clock and a logical counter can be used.

2. A logical counter is _________ after a new timestamp has been assigned
a) Incremented
b) Decremented
c) Doubled
d) Remains the same
View Answer

Answer: a
Explanation: A logical counter is incremented after a new timestamp has been assigned everytime.

3. W-timestamp(Q) denotes?
a) The largest timestamp of any transaction that can execute write(Q) successfully
b) The largest timestamp of any transaction that can execute read(Q) successfully
c) The smallest timestamp of any transaction that can execute write(Q) successfully
d) The smallest timestamp of any transaction that can execute read(Q) successfully
View Answer

Answer: a
Explanation: W-timestamp(Q) denotes The largest timestamp of any transaction that can execute write(Q) successfully.
advertisement
advertisement

4. R-timestamp(Q) denotes?
a) The largest timestamp of any transaction that can execute write(Q) successfully
b) The largest timestamp of any transaction that can execute read(Q) successfully
c) The smallest timestamp of any transaction that can execute write(Q) successfully
d) The smallest timestamp of any transaction that can execute read(Q) successfully
View Answer

Answer: b
Explanation: R-timestamp(Q) denoted the largest timestamp of any transaction that can execute read(Q) successfully.

5. A ________ ensures that any conflicting read and write operations are executed in timestamp order
a) Organizational protocol
b) Timestamp ordering protocol
c) Timestamp execution protocol
d) 802-11 protocol
View Answer

Answer: b
Explanation: A timestamp ordering protocol ensures that any conflicting read and write operations are executed in timestamp order.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The default timestamp ordering protocol generates schedules that are
a) Recoverable
b) Non-recoverable
c) Starving
d) None of the mentioned
View Answer

Answer: b
Explanation: The timestamp ordering protocol generates schedules that are non-recoverable. But it can be extended to make the schedules recoverable.

7. State true or false: The Thomas write rule has a greater potential concurrency than the timestamp ordering protocol
a) True
b) False
View Answer

Answer: a
Explanation: The Thomas write rule has a greater potential concurrency than the timestamp ordering protocol. This is because it is a modified version of the timestamp ordering protocol in which obsolete write operations can be ignored under certain circumstances.
advertisement

8. Which of the following timestamp based protocols generates serializable schedules?
a) Thomas write rule
b) Timestamp ordering protocol
c) Validation protocol
d) None of the mentioned
View Answer

Answer: a
Explanation: Thomas write rule protocol generates serializable schedules that no other protocol can generate.

9. In timestamp ordering protocol, suppose that the transaction Ti issues read(Q) and TS(Ti)<W-timestamp(Q), then
a) Read operation is executed
b) Read operation is rejected
c) Write operation is executed
d) Write operation is rejected
View Answer

Answer: b
Explanation: Suppose that transaction Ti issues read(Q). If TS(Ti ) < W-timestamp(Q), then Ti needs to read a value of Q that was already overwritten. Hence, the read operation is rejected, and Ti is rolled back.
advertisement

10. In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-timestamp(Q), then
a) Read operation is executed
b) Read operation is rejected
c) Write operation is executed
d) Write operation is rejected
View Answer

Answer: d
Explanation: In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-timestamp(Q), then the value of Q that Ti is producing was needed previously, and the system assumed that the value would never be produced. Hence the system rejects the write(Q) operation and the transaction Ti rolls back.

Sanfoundry Global Education & Learning Series – RDBMS.

To practice basic questions and answers on all areas of RDBMS, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.