0% found this document useful (0 votes)
3 views5 pages

Transaction and Concurrency Control - DPP 01

The document contains a series of questions and answers related to Transaction and Concurrency Control in Database Management Systems, specifically for a Computer Science & Information Technology examination. It includes multiple-choice questions about serial and concurrent schedules, irrecoverable schedules, conflict serializability, and issues like cascading rollbacks and lost updates. The answer key is provided at the end, along with hints and solutions for selected questions.
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)
3 views5 pages

Transaction and Concurrency Control - DPP 01

The document contains a series of questions and answers related to Transaction and Concurrency Control in Database Management Systems, specifically for a Computer Science & Information Technology examination. It includes multiple-choice questions about serial and concurrent schedules, irrecoverable schedules, conflict serializability, and issues like cascading rollbacks and lost updates. The answer key is provided at the end, along with hints and solutions for selected questions.
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/ 5

GATE

Computer Science & Information Technology


Database Management System DPP: 1

Transaction and Concurrency Control

Q1 How many serial schedules can be formed (B) Only I is correct


with 4 transactions? (C) Only II is correct
(D) Neither I nor II is correct
Q2 How many concurrent schedules can be
formed with 3 transactions having 4, 3 & 2 Q6 Which of the following schedules is/are
operations respectively? irrecoverable.
(A) R1(A), R2 (C), R1(C), R3(A), R3(B), W1(A), C1,
Q3 Consider the following schedule
W3 (B), C3, R2(B), W2(C), W2(B), C2
S: R1(A); R3(A); R2(A); W1(B); R2(B); R3(A); W2(C);
(B) R1(A), R2 (C), R1(C), R3(A), R3(B), W1(A),
R3(C) over the transactions T1, T2 & T3.
W3(B), R2(B), W2(C), W2(B), C1, C2, C3
If transaction T1 fails just after R3 (C) by
(C) R1(A), R2 (C), R3(A), R1 (C), R2(B), R3 (B),
transaction T3, then which transactions need
W1(A), C1, W2(C), W3(B), W2(B), C3, C2
to be rolled back along with T1?
(D) All are recoverable
(A) T2
(B) T3 Q7 Which of the following schedules is/are conflict
(C) Both T2 & T3 serializable?
(A) R1(x), W1(y), R2(y), W2(z), R3(z), W3(x)
(D) None
(B) W3(x), R1(x), W1(y), R2(y), W2(z), R3(z)
Q4 Consider the following transactions:
(C) R1(x), R2(x), W1(y), W2(y), R1(y), R2(y), W2(z)
T1: W1 (A); W1 (B); R1 (C); C1;
(D) R1(x), R2 (x), R1(y), R2(y), R3(x), W1(x) ,W2(y)
T2: W2 (B); R2 (B); C2:
How many schedules of T1 & T2 are Q8 Consider the following schedule S.
irrecoverable? S
T1 T2 T3
Q5 Two schedules S1 and S2 are called conflict R1(x)
equivalent if S1 can be derived from S2 by a R2(x)
sequence of swaps of non-conflicting R3(y)
operations. W1(x)
Consider the two statements: R2(z)
I → If two schedule are conflict equivalent ,
R2(y)
then their precedence graphs are identical.
W2(y)
II → If two schedules involve same set of
W1(z)
transactions, and their precedence graphs are
Schedule S is conflict equivalent to which of
identical. Then they are conflict equivalent,
the following serial schedule.
(A) Both I & II are correct
(A) T1 → T3 → T2

Android App | iOS App | PW Website


GATE

(B) T3 → T1 → T2 (A) The schedule is conflict serializable


(C) T3 → T2 → T1 schedule
(D) T2 → T1 → T3 (B) The schedule is view serializable schedule
(C) T2 → T1 → T3 is conflict equivalent serial
Q9 Consider the following schedule S.
schedule to S.
S
(D) T2 → T1 → T3 is view equivalent serial
T1 T2 T3
schedule to S.
R2(B)
W2(A) Q10 Consider the following schedule S.

R1(A) S: R1(A), W2(B), R2(C), W3(B), W2(A), W1(A),

R3(A) R3(B), R1(A), R2(C), R3(C), W2(C), C1, C3, C2,


W1(B) Schedule S suffers from which of the following
W2(B) problems?
W3(B) (A) Irrecoverability
(B) Cascading Roll back
Which of the following options is/are correct?
(C) Lost update problem
(D) RW Problem

Android App | iOS App | PW Website


GATE

Answer Key
Q1 24 Q6 B

Q2 1260 Q7 A
Q3 C Q8 C
Q4 6 Q9 B,D
Q5 B Q10 C,D

Android App | iOS App | PW Website


GATE

Hints & Solutions


Q1 Text Solution:
No of serial schedules = 4! = 24

Q2 Text Solution:
9!
No of concurrent schedules = = 1260
4! 3! 2!

Q3 Text Solution:
W1 (B) → R2 (B)
Uncommited dirty read by T2
So, T2 rollbacks.
W2 (C) → R3 (C)
Uncommited dirty read by T3
So, T3 roll backs. Same set of transactions,
Same precedence graph,
Q4 Text Solution:
But not conflict equivalent, as one can not be
W1 (B) → R2 (B)
converted into another.
Uncommited dirty read by T2 Hence, statement II is incorrect.
Before this W1 (A) and W2 (B) can be ordered
Q6 Text Solution:
in 2 ways. In option B we have W3(B) → R2(B), so T2 is
Now for remaining part there are 3
doing uncommitted dirty read operation and
possibilities :
thus it should commit after T3.
W1 (B) R1 (C) C1
Q7 Text Solution:
(i) W1 (B) R2(B) C2 R1 (c) C1 (a)

(ii) W1 (B) R2 (B) R1 (c) C2 C1

(iii) W1 (B) R1 (c) R2(B) C2 C1

2×3=6

Q5 Text Solution: (b)

(c)

(d)

Android App | iOS App | PW Website


GATE

T2 → T1 → T3 is a view equivalent serial


schedule to S.

Q10 Text Solution:

Q8 Text Solution:

Q9 Text Solution:

Cycle
Not conflict serializable
Initial read
B: T2
Updated read
T2 → T 1
T2 → T 3 (c) W2 (A) → W1 (A)
Final write (d) R3 (C) → W2 (C)
B : T3

Android App | iOS App | PW Website

You might also like