

MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Database knowledge and support exam preparation. Choose a topic below to get started.
1. |
Consider the following two-phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1,…,Ok}. This is done in the following manner:Step 1. T acquires exclusive locks to O1,…,Ok in increasing order of their addresses.Step 2. The required operations are performed.Step 3. All locks are released.This protocol will |
A. | guarantee serializability and deadlock-freedom |
B. | guarantee neither serializability nor deadlock-freedom |
C. | guarantee serializability but not deadlock-freedom |
D. | guarantee deadlock-freedom but not serializability |
Answer» B. guarantee neither serializability nor deadlock-freedom | |
2. |
In a database system, unique timestamps are assigned to each transaction using Lamport’s logical clock. Let TS(T1) and TS(T2) be the timestamps of transactions T1 and T2 respectively. Besides, T1 holds a lock on the resource R, and T2 has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database system assuming that a killed transaction is restarted with the same timestamp.If TS(T2) < TS(T1) thenT1 is killedelse T2 waits.Assume any transaction that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks? |
A. | The database system is both deadlock-free and starvation-free. |
B. | The database system is deadlock-free but not starvation-free. |
C. | The database system is starvation-free, but not deadlock-free. |
D. | The database system is neither deadlock-free nor starvation-free. |
Answer» B. The database system is deadlock-free but not starvation-free. | |
3. |
Consider the following two statements about database transaction schedules:I. Strict two-phase locking protocol generates conflict serializable schedules thatare also recoverable.II. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule cangenerate view serializable schedules that are not conflict serializable.Which of the above statements is/are TRUE? |
A. | I only |
B. | II only |
C. | Both I and II |
D. | Neither I nor II |
Answer» D. Neither I nor II | |
4. |
For a multi-processor architecture, In which protocol a write transaction is forwarded to only those processors that are known to possess a copy of newly altered cache line? |
A. | Snoopy bus protocol |
B. | Cache coherency protocol |
C. | Directory based protocol |
D. | None of the above |
Answer» D. None of the above | |