0 votes 0 votes closed as a duplicate of: Made easy ots dbms 2 for gate2019 Question: Consider the following transactions: The number schedules of T1 and T2 recoverable are ________. Databases transaction-and-concurrency + – syncronizing asked Aug 19, 2018 • closed Aug 20, 2018 by Shaik Masthan syncronizing 615 views comment Share Follow See all 13 Comments See all 13 13 Comments reply Shaik Masthan commented Aug 19, 2018 reply Follow Share transactions are not visible 0 votes 0 votes syncronizing commented Aug 19, 2018 reply Follow Share Updated! 0 votes 0 votes Shaik Masthan commented Aug 19, 2018 reply Follow Share is it 33? 0 votes 0 votes MiNiPanda commented Aug 19, 2018 i edited by MiNiPanda Aug 19, 2018 reply Follow Share I write T1 with blank spaces in b/w every operation. __W(A)__W(B)__R(C)__c1__ Dirty read means reading uncommitted data. Dirty read will be there when R(B) and c2 of T2 will be after W(B) of T1 AND before c1 of T1. Note: 1.If R(B) of T2 is after W(B) of T1 and c2 comes after c1 then that is recoverable. 2.W(B) of T2 should not come after W(B) of T1. W(B) of T1 should be succeeded by R(B) only for dirty read case. Case 1: __W1(A)__W1(B) *R2(B)* R1(C) *c2* c1__ W2(B) can be present in any one of the two blanks before W1(B). So 2 ways. Case 2: __W1(A)__W1(B) *R2(B)* *c2* R1(C)__c1__ W2(B) can be present in any one of the two blanks before W1(B). So 2 ways. Case 3:__W1(A)__W1(B)__R1(C) *R2(B)* *c2* c1__ W2(B) can be present in any one of the two blanks before W1(B). Here don't keep W2(B) after W1(B) otherwise it won't be a "dirty read".So 2 ways. If c2 comes after c1 then that is recoverable. Total no. of schedules possible is 7!/(4! * 3!) =35. There are 3 cases only where dirty read can happen. Only these 6 cases will be responsible for non-recoverable schedule. So 35-6=29. Shaik Masthan Please check if this is correct or not. 2 votes 2 votes Shaik Masthan commented Aug 19, 2018 i edited by Shaik Masthan Aug 20, 2018 reply Follow Share @MiNiPanda, yes... you are right... i miss one variable.. it leads to 2 sequences... it is 31, check iamkoushal21 solution 0 votes 0 votes iamkoushal21 commented Aug 19, 2018 i edited by iamkoushal21 Aug 20, 2018 reply Follow Share i was getting these 6 Ir-recoverable, so i think 29 Is answer. Sorry forgot to upload last night. verify this please. 0 votes 0 votes Shaik Masthan commented Aug 20, 2018 reply Follow Share @iamkoushal21, yes it should be 31 W1(A) ---- has 2 choices R1(C) ---- has 2 choices total 4 ir-recoverable schedules possible.... 0 votes 0 votes MiNiPanda commented Aug 20, 2018 i edited by MiNiPanda Aug 20, 2018 reply Follow Share Shaik Masthan I have edited my previous comment. Can you please check it ? I am getting 29 now :/ Also i commented here yesterday but i can't see it anymore :O 0 votes 0 votes Shaik Masthan commented Aug 20, 2018 reply Follow Share @MiNiPanda, Case 3:__W1(A)__W1(B)__R1(C) *R2(B)* *c2* c1__ it is not dirty read.... dirty read means, there is no operation is allowed in between W1(B), R2(B). 0 votes 0 votes MiNiPanda commented Aug 20, 2018 reply Follow Share But the data items are different right? 0 votes 0 votes Shaik Masthan commented Aug 20, 2018 reply Follow Share ya... forgetted the basic point... sorry for that 0 votes 0 votes jatin kumar 3 commented Sep 23, 2018 reply Follow Share why W(B) of T2 should not come after W(B) of T1 ? 0 votes 0 votes Shaik Masthan commented Sep 23, 2018 reply Follow Share @jatin kumar 3 IT IS CLOSED.... you go to the link which provided at closing tag and check the answer, still any doubt then comment. 0 votes 0 votes Please log in or register to add a comment.