04 Try it yourself Interactive

Two clerks, one row, one payment that disappears

Same table, same column, same Asha, who owes 20,000 in all. She pays it at two windows in the same minute: 12,000 to Clerk A at the fees counter, 8,000 to Clerk B at the hostel desk. The record should end at 20,000 either way. Shared file is what happens when the record is a sheet each clerk opens, edits and saves back. Transaction is the same pair of writes with a DBMS underneath. Both runs open the same way, with A first and B a moment behind. They part company at step 2, and step 2 is the entire reason sharing is on the advantage list.

Shared file
fees.csv · nothing is locked
The middle card is the one stored row. The outer cards are what each clerk currently believes. Indigo marks who is acting this step.
Press Next to begin. Each press advances the run by one step.


      
In the record
Clerks waiting
Payments kept0
Rupees lost0
step 0 / 0