Week 7 - Schedules, Serializability / Analyze

The questions can come in any order, so make sure you are selecting right option for all questions.

1. Transaction T2 transfers 10 percent of the balance from acctount A to B. Match the steps in correct order.

2. T1 has one transactions that transfers funds from one acount to another. The transaction is such that $50 are transfered from account A to B. Determine the steps and keep them in order of occurance.

3. The lost update anomaly is said to occur if a transaction Tj reads a data item, then another transaction Tk writes the data item (possibly based on a previous read), after which Tj writes the data item. The update performed by Tk has been lost, since the update done by Tj ignored the value written by Tk.

Question 1
Identify the schedule showing the lost update anomaly.

(a) A

Question 2
Determine the schedule to show that the lost update anomaly is possible with the read committed isolation level.

(c) C

Question 3
Choose the correct reasons as to why the lost update anomaly is not possible with the repeatable read isolation level.

(a) In repeatable read isolation level, a transaction T1 reading a data item X, holds a shared lock on X till the end.
(b) It is difficult for a newer transaction T2 to write the value of X (which requires X-lock) until T1 finishes.
(c) It will force the serialization order T1, T2 and thus the value written by T2 is not lost.

Post a Comment