Assume the following two tables describe parts and orders:
Consider the following two transactions, that are to be applied to the tables:
If the current discount for part P1 is greater than or equal to 10%, double the order quantity.
This transaction modifies the order table based on the parts table:
CURRENT VALIDTIME UPDATE Orders FROM Parts SET Quantity= quantity*2 WHERE discount >= 10 AND Orders.part_id = Parts.part_id;
If the current order quantity for P1 is less than 100, reduce the discount by one half.
This transaction modifies the parts table based on the order table
CURRENT VALIDTIME UPDATE Parts FROM Orders SET discount = discount/2.0 WHERE quantity < 100 AND Parts.part_id = Orders.part_id ;
Assuming the transactions execute serially, the results will depend on which transaction executes first. This is demonstrated by the first two examples below.