The Gateway to Computer Science Excellence
+2 votes
248 views

Consider the following schedule:

The number of serial schedules which are view equal to schedule (S) ___________.

Answer is 10 as per the given solution.

Please explain how to solve these type of questions

in Databases by Junior (829 points)
edited by | 248 views
0
i'm getting 15
0

according to the rules initial read must be same

can someone explain the meaning of this through this quesiton?

0
i getting 10 only.
0
@Anu

i 'm getting like this...

1->2->5 and 1->4

1 2 5 now 4 may arrage in 3 way and  t3 could be anywhere (5 way..) so i think 3*5 =15  ?
0

@Anu007

this is the polygraph I am getting 

0
T4 cannot come after T5 since T5 must be last  b/c of final write of B
0
i missed a point i got it....10 is the answer.....

2->4 because initial value of a must be read by 2 not 4...

so....1 2 5 ....4 may arranged in 2 way and 3 could be anywhere (5)...total 5*2=10
0
Can anyone please tell the complete solution,i.e. how to approach such kind of problems.
0
@vishal chugh

there are 3 types of restrictions that we need to find out

1.) the first read on all the data items must be done by same transaction in order to be view serializable with given transaction.

2.) the final write on all the data items must be done by same transaction.

3.) the write read dependency must follow the same order as in given schedule.

this is what i know as of now
0
@hs_yadav

why there are 2 possibilities for T4

I mean the initial read is to be done by T2 and. T4 is also reading on B. So T2 must come before T4 in order to be the first one to read data item B

please explain
0
ye sure.....

1 2 _5_   at place of dot T4 could be placed....

now if u think  that T5 must be last ...but why if there are any other write on B then may be problem but for this case

..T5 is not neccessory at last...becoz it is only write on B...(according to view seri. defination last write on all account sho
0
ye sure.....

1 2 _5_   at place of dot T4 could be placed....

now if u think  that T5 must be last ...but why if there are any other write on B then may be problem but for this case

..T5 is not neccessory at last...becoz it is only write on B...(according to view seri. defination last write on all account should be same and that is)
0
@hs_yadav

but T5 must occur after T4 so that is does not mess with the W-R dependency of T1-T4

please tell me where i am going wrong :(
0
Yes, I think 5 should be the answer. Can't understand why 10,i.e. how there are 2 ways of arranging 1,2,4 and 5?

1 Answer

+1 vote

let me know if done any mistake-

by Boss (10.8k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,324 answers
198,405 comments
105,169 users