Data Base Management System | Week 7

Session: JAN-APR 2024

Course Name: Data Base Management System

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q1. Consider the following schedule S involving five transactions T1, T2, T3, T4 and T5:
R(X) denotes read operation on data item X by transaction Ti.
W(X) denotes write operation on data item X by transaction Ti.
Choose the correct option for the above transaction schedule.
a) The schedule is both view and conflict serializable schedule.
b) The schedule is neither conflict serializable nor view serializable schedule.
c) The schedule is only view serializable schedule.
d) The schedule is only conflict serializable schedule.

Answer: a) The schedule is both view and conflict serializable schedule.


Q2. Consider the following schedule S involving five transactions T1, T2, T3, T4 and T5:
R(X) denotes read operation on data item X by transaction Ti.
W(X) denotes write operation on data item X by transaction Ti.
Identify the possible number of conflict serializable schedules of the above schedule S.

a) 1
b) 2
c) 3
d) 4

Answer: c) 3


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q3. Consider the following schedule S involving four transactions T1, T2, T3, and T4.
R(X) denotes read operation on data item X by transaction Ti.
W(Y) denotes write operation on data item Y by transaction Ti.
Identify the correct option(s) that represent the order of execution of all transactions of the above schedule S.

a) T1→T2→T3→T4
b) T3→T4→T1→T2
c) T4→T1→T3→T2
d) T3→T2→T1→T4

Answer: b) T3→T4→T1→T2


Q4. Suppose in a database, there are four transactions T1, T2, T3 and T4. Transaction Ta is waiting for transactions T3 and T₁, transaction T₁ is waiting for transaction T3, and transaction T3 is waiting for transaction T₁ to release a data item.
Identify the correct wait-for graph for the above scenario.

a)
b)
c)
d)

Answer: b)


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q5. Consider the following schedule S of transactions T1 and T2. The read operation on data item A is denoted by read (A) and the write operation on data item A is denoted by write(A).
Which of the following is TRUE about the schedule S?

a) S is not serializable either as T1, T2 or T2, T1.
b) S is serializable both as T1, T2 and T2, T1.
c) S is serializable only as T1, T2.
d) S is serializable only as T2, T1.

Answer: c) S is serializable only as T1, T2.


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q6. Identify the correct statement(s) about the lock compatibility matrix given below, where S denotes a shared mode lock and X denotes an exclusive mode lock.

a) If a transaction holds a S lock on a data item, other transaction will not be allowed to obtain a S lock on the same data item.
b) If a transaction holds a S lock on a data item, other transaction will not be allowed to obtain a X lock on the same data item.
c) If a transaction holds an X lock on a data item, other transactions can not be allowed to obtain a S lock on the same data item.
d) If a transaction holds an X lock on an item, other transactions can be allowed to obtain a S lock on the same data item.

Answer: b, c


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q7. Suppose in a database, there are three transactions T1, T2 and T3 with timestamps 15, 18, and 19 respectively. T2 is holding some data items which T1, T3 are requesting to acquire. Which of the following statement(s) is (are) correct in respect of Wait-Die Deadlock Preven- tion scheme?
a) Transaction T1 will wait for T2 to release the data item.
b) Transaction T3 will wait for T2 to release the data item.
c) Transaction T1 will be rollback.
d) Transaction T3 will be rollback.

Answer: a), d)


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


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 Ti. write(A) denotes write operation on data item A by the transaction T.
Which of the following statement(s) is/are true?

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

Answer: b) T₁ follows the rigorous two-phase locking protocol only, but Ta follows the two-phase locking protocol only.


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q9. Consider two schedules S₁ and S₂ as follows, where S denotes a shared mode lock and X denotes an exclusive mode lock.
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 S₂ will suffer from deadlock.
b) S₁ will suffer from deadlock, S₂ will not suffer from deadlock.
c) S₁ will not suffer from deadlock, S₂ will suffer from deadlock.
d) Neither S₁ nor S₂ will suffer from deadlock.

Answer: d) Neither S₁ nor S₂ will suffer from deadlock.


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers


Q10. Consider the following two schedules S1 and S2.
R(X) denotes read operation on data item X by Transaction Ti.
W(X) denotes write operation on data item X by Transaction Ti.
Which of the following statement(s) is/are true for the above two schedules S1 and S2?

a) Both schedules S1 and S2 are Recoverable Schedules.
b) Both schedules S1 and S2 are Cascadeless Schedules.
c) The schedule S1 is Cascadeless Schedule, the schedule S2 is Recoverable Schedule.
d) The schedule S1 is not a Recoverable Schedule, the schedule S2 is Cascadeless Schedule.

Answer: a), c)


For answers or latest updates join our telegram channel: Click here to join

These are Data Base Management System Week 7 Assignment Answers

More Solutions of Data Base Management System: Click Here

More NPTEL Solutions: Click Here


Course Name: Data Base Management System

Course Link: Click Here

These are Data Base Management System Week 7 Assignment Answers


Q1. Consider the following schedule 8 of transactions T1 and T2.
The read operation on data item A is denoted by read(A) and the write operation on data item A is denoted by write (A).

image 10

Which of the following is TRUE about the schedule S?
a) S is serializable both as T1, T2 and T2, T1.
b) S is not serializable neither as T1, T2 nor T2, T1.
c) S is serializable only as T1, T2.
d) S is serializable only as T2, T1.

Answer: a) S is serializable both as T1, T2 and T2, T1.


These are Data Base Management System Week 7 Assignment Answers


Q2. Consider the following schedule S involving six transactions T1, T2, T3, T4, T5 and T6 :

image 11

R(X) denotes read operation on data item X by transaction Ti.
W(X) denotes write operation on data item X by transaction Ti.
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.


These are Data Base Management System Week 7 Assignment Answers


Q3. Consider the following schedule S involving four transactions T1, T2, T3 and T4.

image 12

R(X) denotes read operation on data item X by transaction Ti.
W(X) denotes write operation on data item X by transaction Ti.
Identify the possible number of conflict serializable schedules of the above schedule S.

a) 1
b) 2
c) 3
d) 4

Answer: a) 1


These are Data Base Management System Week 7 Assignment Answers


Q4. Consider the following schedule S.

image 13

R(Y) denotes read operation on data item Y by Transaction Ti.
W(Y) denotes write operation on data item Y by Transaction T₁.
Identify the possible number of view serializable schedule of the above schedule S.

a) 1
b) 2
c) 3
d) 4

Answer: d) 4


These are Data Base Management System Week 7 Assignment Answers


Q5. Suppose in a database, there are four transactions T₁, T2, T3 and T₁. Transaction T₁ is waiting for transactions T₂ and T4, transaction T₂ is waiting for transaction T3 and T₁, and transaction T3 is waiting for transactions T4 to release a data item. Identify the correct wait-for graph for the above scenario.

image 14

Answer: b


These are Data Base Management System Week 7 Assignment Answers


Q6. Consider two transactions given below where lock-X(A) denotes T; has obtained an Exclusive-mode lock on item A and lock-S(A) denotes Ti has obtained a Shared-mode lock on item A.

image 15

Which of the following statement is (are) true?
a) Both T₁ and T₂ follow the rigorous two-phase locking protocol.
b) Both T₁ and T2 do not follow the rigorous two-phase locking protocol.
c) Only T₁ follows the rigorous two-phase locking protocol.
d) Only T₂ follows the rigorous two-phase locking protocol.

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


These are Data Base Management System Week 7 Assignment Answers


Q7. Suppose in a database, there are three transactions T₁, T2 and T3 with timestamp 12, 14 and 16 respectively. T₁ is holding a data item which T2 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 be aborted.
d) Transaction T3 will be aborted.

Answer: b, c


These are Data Base Management System Week 7 Assignment Answers


Q8. Consider the following schedule S.

image 16

R(Y) denotes read operation on data item Y by Transaction Ti.
W(Y) denotes write operation on data item Y by Transaction Ti.
Identify the correct statement(s) based on the above schedule S.

a) If T1 fails (aborted), only T2 must be rolled back.
b) If T1 fails (aborted), only T3 must be rolled back.
c) If T1 fails (aborted), both T2 and T3 must be rolled back.
d) If T1 fails (aborted), neither T2 nor T3 must be rolled back.

Answer: d) If T1 fails (aborted), neither T2 nor T3 must be rolled back.


These are Data Base Management System Week 7 Assignment Answers


Q9. Consider the following schedule S.

image 17

R(X) denotes read operation on data item X by Transaction Ti.
W(X) denotes write operation on data item X by Transaction T₁.
Choose the correct options for the above schedule.

a) The schedule is only recoverable schedule.
b) The schedule is only cascadeless schedule.
c) The schedule is recoverable schedule and cascadeless schedule both.
d) The schedule is neither recoverable nor cascadeless schedule.

Answer: a) The schedule is only recoverable schedule.


These are Data Base Management System Week 7 Assignment Answers


Q10. Identify the correct option(s) which is (are) used in Transaction Control Language (TCL).
a) Alter
b) Insert
c) Update
d) Savepoint

Answer: d) Savepoint


These are Data Base Management System Week 7 Assignment Answers

More Solutions of Data Base Management System: Click Here

More NPTEL Solutions: https://progiez.com/nptel-assignment-answers/


These are Data Base Management System Week 7 Assignment Answers
The content uploaded on this website is for reference purposes only. Please do it yourself first.
Home
Account
Cart
Search