A multi-user database system is used to support the customer payment operations of a XYZ store. Unfortunately, the system currently does not enforce concurrent control on transactions accessing and updating the data. A particular customer had a balance due of HK$ 300 when the following three transactions related to the customer were processed at the same time: (i) Payment of HK$ 300; (ii) Purchase on credit of HK$ 150; and (iii) Merchandise return (credit) of HK$ 100. Each of the three transactions read the customer record when the balance was HK$ 300. That is, all transactions have read the record before any of them was completed. The updated customer record was returned from the transactions to the database in the order of first (i), then (ii) and finally (iii). (a) After the last transaction was completed, what balance will be recorded for the customer? (b) What balance should be actually recorded for the customer after the three transactions have been processed?
A multi-user
Each of the three transactions read the customer record when the balance was HK$ 300. That is, all transactions have read the record before any of them was completed. The updated customer record was returned from the transactions to the database in the order of first (i), then (ii) and finally (iii).
(a) After the last transaction was completed, what balance will be recorded for the customer?
(b) What balance should be actually recorded for the customer after the three transactions have been processed?
Step by step
Solved in 3 steps