## Questions on Timestamp Ordering

 Questions on Timestamp Ordering Question 1 : Which of the following TS order allow to execute the above schedule using BTSO (Basic Timestamp Ordering) Protocol ? R1(A); R2(B); W1(C); R3(B); R3(C); W2(B); W3(A) a) (T1,T2,T3) = (10,20,30) b) (T1,T2,T3) = (30,10,20) c) (T1,T2,T3) = (30,20,10) d) (T1,T2,T3) = (20,30,10) e) (T1,T2,T3) = (10,30,20) Solution :…

## Questions on View Serializable

 Questions on View Serializable Question 1 : Check whether the schedules is View serializable or not ? R2(A); R1(A); W1(C); R3(C); W1(B); R4(B); W3(A); R4(C); W2(D); R2(B); W4(A); W4(B) Solution : Check for View Equivalent Schedule : Step 1 : Final Updation on data items : A : T3 T4 B : T1 T4 C…

## Questions on Conflict Serializable

 Questions on Conflict Serializable Question 1 : Check whether the schedules is conflict serializable or not ? S : R2(A); W2(A); R3(C); W2(B); W3(A); W3(C); R1(A); R1(B); W1(A); W1(B) Solution : Conflict Pairs Dependency Relation W2(A) W3(A) T2 → T3 W3(A) R1(A) T3 → T1 W2(B) R1(B) T2 → T1  ⇒ No cycle formed. Therefore, conflict…

## Serializability in Database

 Serializability in Database A schedule S of n transactions is serializable if it is equivalent to some serial schedule of the ‘n’ transactions. Every serializable schedule is consistent i.e. it is not suffering from RW, WR, WW etc. The concept of serializability of schedules is used to identify which schedules are correct when transaction executions have interleaving of…

## Multiple Granularity Locking Protocol

 Multiple Granularity Locking Protocol Before defining Multiple Granularity – let us define what is Granularity ? Granularity is the size of data item  allowed to lock. Multiple Granularity is the hierarchically  breaking up the database into portions which are lockable and maintaining the track of what to be lock and how much to be lock…

## Thomas write rule

 Thomas write rule Thomas write rule modify or improves the Basic Timestamp Ordering Algorithm (BTSO Algorithm). According to Basic Timestamp Ordering Algorithm (BTSO Algorithm) : When Transaction Ti issues READ Operation : If TS(Ti) < WTS(Q), then ROLLBACK Ti. RESTART Ti Otherwise, allowed to execute READ operation by transaction Ti and Set RTS(Q) = max(RTS(Q), TS(Ti))…

## Timestamp Ordering Protocols

 Timestamp Ordering Protocols In timestamp based protocols, the system itself tries to detect possible inconsistency during concurrent execution and recovers from it or avoids it. In it, for every transaction the system executes, the system gives the timestamp to that transaction i.e. it provides a set of timestamps to every transaction Ti by unique timestamp( any integer…