Example - Consistency
•How to write the app to keep integrity holding?
•MakeSale logic:
–Reduce Instore.qty
–Calculate sum over all stores and warehouse
–If sum < 50, then ROLLBACK // Sale fails
–If sum < 70, check for order where date is null
•If none found, insert new order for say 25