The bank has three accounts. Each change to a balance adds a row to account_log, with the number of its transaction in tx.
- Add 5 to Sofia's balance (account 3) with one UPDATE and no
BEGIN. Run the same UPDATE a second time. - Look at
account_log. Do the two new rows have the sametx? - Move 100 from Ava (account 1) to Liam (account 2) in one transaction. Do not commit yet. Look at both tabs.
- Commit the transfer.
If a balance goes wrong, reset the lab and start again.