DBMS Assignment-4

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ASSIGNMENT NO.

04 (UNIT-IV)
Course Outcome-4, Session 2023-24
SUB: Data Base Management Systems (KCS-501)

Q.1. Find out the following schedules is Conflict Serializable or not, If Conflict Serializable
then finds out the equivalent serial schedule.

a) r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z).
b) r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z).
c) r2(A); w2(A); r3(C); w2(B); w3(A); w3(C); r1(A); r1(B); w1(A); w1(B).
d) r3(C); r2(A); w2(A); w2(B); w3(A); r1(A); r1(B); w1(A); w1(B); w3(C).
e) r2(A); r2(C); w3(A); w2(A); w2(B); w3(C); r1(A); r1(B); w1(A); w1(B).

Q.2 Based upon the given schedule S, answer the following questions.
a) How many conflict equal serial schedules possible?
b) How many view equal serial schedule possible?

T1 T2 T3 T$

R(A)

R(A)

R(A)

R(A)

W(B)

W(B)

W(B)

W(B)

Q.3 Consider the following classes of schedule: Serializable, Conflict-Serializable, View-


Serializable, Recoverable, Cascade-less Recoverable, Strict Recoverable. For each of the
following schedule, which of the preceding classes it belong to.

a) r1(x); r2(x); w1(x); w2(x).


b) w1(x); r2(y); r1(y); r2(x).
c) r1(x); r2(y); w3(x); r2(x); r1(y).
d) r1(x); r1(y); w1(x); r2(y); w3(y); w1(x); r2(y).
e) r1(x); w2(x); w1(x); T2: Rollback; T1: Commit.
f) r1(x); w2(x); w1(x); T2: Commit; T1: Commit.
g) w1(x); r2(x); w1(x); T2: Rollback; T1: Commit.
h) w1(x); r2(x); w1(x); T2: Commit; T1: Commit.
i) w1(x); r2(x); w1(x); T2: Commit; T1: Rollback.
j) r2(x); w3(x); T3: Commit; w1(y); T1: Commit; r2(y); w2(z); T2: Commit.
k) r1(x); w2(x); T2: Commit; w1(x); T1: Commit; r3(x); T3: Commit.
l) r1(x); w2(x); w1(x); r3(x); T1: Commit; T2: Commit; T3: Commit.
Q.4 Explain the disadvantage of Basic 2PL(without lock upgrading) with suitable example.
Q.5 Explain the different types of 2-Phase Locking Protocol with suitable example. Q.
Q.6 Describe the following terms with example:
a) Deadlock
b) Starvation

Q.7 Explain about the different deadlock handling techniques.

Q.8 Explain about the different recovery techniques?

Q.9 Consider a simple check-pointing protocol and the following set of operations in the log.
(start,T4); (write,T4,y,2,3); (start,T1); (commit,T4); (write,T1,z,5,7); (checkpoint);
(start,T2); (write,T2,x,1,9); (commit,T2); (start,T3); (write,T3,z,7,2); If a crash happens ow
and the system tries to recover using both undo and redo operations, what are the contents
of the undo list and the redo list (along with the explanation)

Q.10. Consider the three transactions T1, T2, and T3 and the schedules S1 and S2
given below. Draw the serializability graph for S1 and S2.
T1: r1(X); r1(Z); w1(X);
T2: r2(Z); r2(Y); w2(Z); w2(Y);
T3: r3(X); r3(Y); w3(Y);
S1: r1(X); r2(Z); r1(Z); r3(X); r3(Y); w3(Y); r2(Y); w2(Z); w2(Y);
S2: r1(X); r2(Z); r1(X); r1(Z); r2(Y); r3(Y); w1(X); w2(Z); w3(Y); w2(Y);
Q.11 What are various techniques of recovery from transaction failures? Explain
each one

Q.12 What are ACID properties? Explain it for banking system which have many
accounts and set of transactions that access and updates those accounts.

You might also like