0% found this document useful (0 votes)
19 views12 pages

Database Management Assignment Help

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

Database Management Assignment Help

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

For any help Assignment Help related queries Call us at :- +1 678 648 4277

You can mail us at:- [email protected]


reach us at :- www.databasehomeworkhelp.com/

Database Management Assignment Help


Q1.
Consider the following schedule S involving four transactions T₁, T₂, T 3 and T₁:

T1 T2 T3 T4

R (X)
W (X)
W (Y)
W(X)
W(Z)
W(X)
W(X)
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 T₁. Choose the
correct option for the above transaction schedule.
a) The schedule is only view serializable schedule.
b) The schedule is only conflict serializable schedule.
c) The schedule is both view and conflict serializable schedule.
d) The schedule is neither conflict serializable nor view serializable
schedule.
Answer: c) The schedule is both view and conflict serializable schedule.

Q2. Consider the following schedule S involving four transactions T1,


T2, T3 and T₁:

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

R(X) R(X) R (Y)


W(X) W (Y)
R(Y)
R (Y) W(X)
W (Y) R(Y)
W(Y) W(Y)
R(X) R(X)
W(X) W(X)
Answer: c)

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.

Answer: 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.
Q7.

Consider two schedules S and S₂ as follows.

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.

Answer: c) S₁ will not suffer from deadlock. Sy 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)

unlock (B) commit

Which of the following statement(s) is/are true?


a) Both T₁ and T₂ follow the rigorous two-phase locking protocol.
b) Both T₁ and To do not follow the rigorous two-phase locking
protocol.
c) Only T₁ follows the rigorous two-phase locking protocol but T₂
follows the strict two-phase locking protocol.
d) Only T₁ follows the rigorous two-phase locking protocol but T₂ does
not follow the strict two-phase locking protocol.

Answer: d) Only T₁ follows the rigorous two-phase locking protocol


but T₂ does not follow the strict two-phase locking protocol.
Q9.
Consider the following two schedules S1 and $2.

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

R(X) denotes read operation on data item X by Transaction Ti. W(X)


denotes write operation on data item X by Transaction T
Which of the following statement(s) is/are true for the above two
schedules S1 and S2?
a) The schedule S1 is Recoverable Schedule and the schedule S2 is
Cascadeless Schedule.
b) The schedule S1 is Cascade less Schedule and the schedule S2 is
Recoverable Schedule.
e) Both schedules S1 and $2 are Cascade less Schedule.
d) Both schedules S1 and S2 are Recoverable Schedule

Answer: b) The schedule S1 is Cascade less Schedule and the


schedule S2 is Recoverable Schedule.
d) Both schedules S1 and S2 are Recoverable Schedule

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.

You might also like