479 views
0 votes
0 votes
T(1) T(2)
R(A)  
  W(A)
W(A)  

SUPPOSE WE HAVE TWO TRANSACTION T1 AND T2.

AND ALSO INTIAL VALUE OF A IS 100. THEN WE FIRST READ  A AND THEN FROM T(2) WRITE A . SO MY DOUBT IS WHEN I AM WRITING A WITHOUT ANY CONDITION SPECIFYING . WHAT DOES IT MEAN ???? WHETHER A IS GOING TO CHANGE TO ANY VALUE AND WE DONT CONDITION OR IT IS JUST WRITING A VALUE WHICH IS 100.

 

I AM NOT GETTING THIS CONCEPT .

2 Answers

Best answer
0 votes
0 votes

Let me further clarify your confusion. Look at the following picture carefully (along with the color coding),

You can see that I've initialized the value of A in the first line in red color.

Notice that when there is a READ operation, then no change takes place either in the buffer or in the database.

When there is a WRITE operation, then changes take place at both the buffer and the database.

I've added an additional line A=A+5 (in green) so as to show you that here, changes will only take place in the buffer and not in the database.

Also the WRITE operation in the T2 will be a blind write just because it did not read the value of A before writing it in the database.

selected by
1 votes
1 votes
Here,W(A) in T2 means (Blind Write),i.e without reading the actual value of A(100) T2 will write its value and then T1 will write its own value, that means if T2 writes it as A=A-10(90) and then T2 will write it as A=A-20(90-20).

Related questions

1 votes
1 votes
4 answers
1
samarpita asked Nov 13, 2021
587 views
every strict recoverable schedule is conflict serializable..if not then why?
0 votes
0 votes
2 answers
2
2 votes
2 votes
0 answers
3
vinay chauhan asked Jan 18, 2019
576 views
Is different 2 phase locking a subset of each other? For example, if the schedule is Strict 2PL then it will also be simple 2PL.Something like a 2PL is a subset of Strict...
0 votes
0 votes
1 answer
4
jatin khachane 1 asked Jan 16, 2019
1,311 views
Is the following schedule conflict serializableT1T2T3W(X) commit R(X) W(X) R(X) W(X) commit W(X) commit