Example – No Dirty data
•
•AcceptReturn(p1,s1,50) MakeSale(p1,s2,65)
•Update row 1: 25 -> 75
•//t1 W-locks InStore. row 1
•                                      update row 2: 70->5
•                               //t2 W-locks Instore.row2
•                                  try  find sum:// blocked
•                         //  as R-lock on Instore.row1
•                         // can’t be obtained
•Abort
•// rollback row 1 to 35; release lock
•                                      // now get locks                            
•                                      find sum: 40
•                                      ROLLBACK
•                                      // row 2 restored to 70
•                                     
•
etc
etc
etc
60
s1
p2
70
s2
p1
25
s1
p1
Initial state of InStore, Product
Final state of InStore, Product
Integrity constraint is valid
etc
etc
etc
60
s1
p2
70
s2
p1
25
s1
p1
etc
etc
etc
44
etc
p2
10
etc
p1
etc
etc
etc
44
etc
p2
10
etc
p1