Concept related to transaction?

19 views Asked by At

I was reading about transactions in DBMS. Just get started with it. But I am super confused with one concept.

enter image description here

Suppose initially A=100

For T1 A=100 and doing A = A-50

For T2 temp would be 10 and change A=90. So T2 would write A=90.

Now when T1 is doing write(A) then it should write A=50 because it has done A=A-50. But it is showing T1 is writing A=90 same as T2.

Why it is happening?

1

There are 1 answers

1
Simayile On

If A is a variable then it's context is shared accross the program, you should try to use a temporary value in calculations.