Database Management Assignment Help
Database Management Assignment Help
T1 T2 T3 T4
R (X)
W (X)
W (Y)
W(X)
W(Z)
W(X)
W(X)
W(Z)
T1 T2 T3 T4
R (X)
W (X)
R(Y)
W (Y)
R (Y)
W (Y)
R(X)
W(X)
R(X)
W(X)
W (Z)
W (Z)
R(X) denotes read operation on data item X by transaction T. W(X)
denotes write operation on data item X by transaction Ti.
Identify the correct option(s) that represents the order of
execution of all transactions of the above schedule S.
a) T2 T3 T4→TI
b) T2-T4-T3-T1
c) T1-T3 T4 T2
d) T1 T2 T3 T4
Answer: b) T2-T4-T3-T1
Q3.
Consider the following schedule S involving two transactions T₁
and T₂:
T1 T2
R (Y)
W (Y)
R(X)
W(X)
R(Y)
W(Y)
R(X)
W(X)
R(X) denotes read operation on data item X by transaction T W(Y) denotes
write operation on data item Y by transaction T₁. which one of the following
schedule (s) is/are conflict equivalent to the above schedule.
a) T1 T2 b) T1 T2
R(X) R (Y)
W(X) W (Y)
R(Y) R(X)
W(Y) W(X)
R(Y) W(X)
W(Y) R(X)
R(X) R(Y)
W(X) W(Y)
c) T1 T2 d) T1 T2
T1 T2
R(X)
W(X)
R(Y)
R (Y)
W (Y)
W(Y)
R(X)
W(X)
Q4.
Consider the following schedule S.
T1 T2 T3
R(X)
W(X)
R(X)
W(X)
W(X)
W(Y)
R(X) denotes read operation on data item X by Transaction Ti.
W(X) denotes write operation on data item X by Transaction T₁.
Identify the possible number of view serializable schedule of the
above schedule S.
a) 4
b) 3
c) 2
d) 1
Answer: c) 2
Q5.
Consider the following schedule S involving four transactions T1,
T2, Ts and T4.
T1 T2 T3 T4
R(X)
W(X)
W(Y)
R(Y)
W(Y)
R(X) denotes read operation on data item X by transaction Ti.
W(Y) denotes write operation on data item Y by transaction T₁.
Identify the possible number of conflict serializable schedule of
the above schedule S.
a) 1
b) 2
c) 3
d) 4
Answer: d) 4
Q6.
Suppose in a database, there are three transactions T1, T₂ and T3
with timestamps 12, 16 and 20 respectively. Ta is holding some
data items which Tį and T3 are requesting to acquire. Which of the
following statement(s) is (are) correct in respect of Wound-Wait
Deadlock Prevention Scheme?
a) Transaction T will wait for T₂ to release the data item.
b) Transaction T3 will wait for T₂ to release the data item.
c) Transaction T will wounds (forces rollback) of Tą to release the
data item.
d) Transaction 73 will wounds (forces rollback) of T₂ to release the
data item.
S1 S2
T1 T2 T1 T2
Lock-X(A) Lock-S
Read (A) Read (A)
Lock-S(B) Lock-S(B)
Read (B) Read (B)
Write (A) Lock- X (A)
Unlock (A) Read (A)
Unlock (B) Write (A)
Lock-X (A) Lock-X (B)
Read (A) Read (B)
Write (A) Write (B)
Unlock (A) Unlock (B)
Unlock (A)
Unlock (A)
Unlock (B)
Identify the correct statement from the following which relates to
whether the schedules are deadlock free. Please note that if any
schedule suffers from deadlock, some operations of the
transactions in that schedule may not be executed.
a) Both S₁ and S2 will suffer from deadlock.
b) S₁ will suffer from deadlock, So will not suffer from deadlock.
c) S₁ will not suffer from deadlock. Sy will suffer from deadlock.
d) Neither Si nor S₂ will suffer from deadlock.
Q8.
Consider two transactions given below where lock-X(A) denotes T;
has obtained an Exclusive-mode lock on data item A and lock-S (A)
denotes T; has obtained a Shared-mode lock on data item A. read
(A) denotes read operation on data item A by the transaction T.
write (A) denotes write operation on data item A by the
transaction T.
T1 T2
lock-S(A)
lock-S (A)
read (A)
read (A)
lock-X(B)
lock-X (B)
read (B)
read (B)
write (B)
unlock (A)
Commit
unlock (A) unlock (B)
S1 S2
T1 T2 T1 T2
R(X) R(X)
W(X) W (X)
COMMIT R(X)
R(X) W(X)
W(X) COMMIT
COMMIT COMMIT
Q10.
Identify the correct option(s) which is (are) used for Transaction
Control Language (TCL).
a) Rollback.
b) Set Transaction.
c) Update
d) Insert
Answer: a) Rollback.
b) Set Transaction.