0% found this document useful (0 votes)
248 views1 page

Transaction Practice Questions

The document contains several questions related to transaction processing and concurrency control. It asks the reader to analyze schedules to determine serializability, recoverability conditions, and adherence to locking protocols. It also asks about the number of possible serial schedules for a given set of transactions, why SQL requires an explicit transaction end but not begin, how two-phase locking guarantees serializability, variations of two-phase locking, and deadlock prevention protocols.

Uploaded by

ArXlan Xahir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
248 views1 page

Transaction Practice Questions

The document contains several questions related to transaction processing and concurrency control. It asks the reader to analyze schedules to determine serializability, recoverability conditions, and adherence to locking protocols. It also asks about the number of possible serial schedules for a given set of transactions, why SQL requires an explicit transaction end but not begin, how two-phase locking guarantees serializability, variations of two-phase locking, and deadlock prevention protocols.

Uploaded by

ArXlan Xahir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Transaction Practice Questions

Question:
Draw the serializability (precedence) graphs for schedules given below, and state whether each schedule
is serializable or not. If a schedule is serializable, write down the equivalent serial schedule(s).
S1: r1 (X); r2 (Z); r1 (Z); r3 (X); r3 (Y); w1 (X); w3 (Y); r2 (Y); w2 (Z); w2 (Y);
S2: r1 (X); r2 (Z); r3 (X); r1 (Z); r2 (Y); r3 (Y); w1 (X); w2 (Z); w3 (Y); w2 (Y);
S3:r1(X); r3(X); w1(X); r2(X); w3(X);

Question:
Consider schedules S3, S4, and S5 below. Determine whether each schedule is strict, cascadeless,
recoverable, or nonrecoverable. (Determine the strictest recoverability condition that each schedule
satisfies.)
S3: r1 (X); r2 (Z); r1 (Z); r3 (X); r3 (Y); w1 (X); c1; w3 (Y); c3; r2 (Y); w2 (Z); w2 (Y); c2;
S4: r1 (X); r2 (Z); r1 (Z); r3 (X); r3 (Y); w1 (X); w3 (Y); r2 (Y); w2 (Z); w2 (Y); c1; c2; c3;
S5: r1 (X); r2 (Z); r3 (X); r1 (Z); r2 (Y); r3 (Y); w1 (X); c1; w2 (Z); w3 (Y); w2 (Y); c3; c2;

Question:
How many serial schedules exist for the three transactions in Figure given below? What are they? What
is the total number of possible schedules?

Question:
Why is an explicit transaction end statement needed in SQL but not an explicit begin statement?

Question:
Prove that the basic two-phase locking protocol guarantees conflict serializability of schedules. (Hint:
Show that if a serializability graph for a schedule has a cycle, then at least one of the transactions
participating in the schedule does not obey the two-phase locking protocol.)

Question:
What is the two-phase locking protocol? How does it guarantee serializability?

Question:
What are some variations of the two-phase locking protocol? Why is strict or rigorous two-phase locking
often preferred?

Question:
Describe the wait-die and wound-wait protocols for deadlock prevention.

You might also like