





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






























Introduction Undo Logging Redo Logging
2
Name White Green Gray
Age 52 3421 1
Constraints ( as we use here) may not capture “full correctness”
Example 1 Transaction constraints
new salary > old salary
balance = 0
Constraints ( as we use here) may not capture “full correctness”
Example 2 Database should reflect real world
7
DB
Reality
Observation: DB cannot be consistent always! Example: a 1 + a 2 +…. an = TOT ( constraint ) Deposit $100 in a 2 : a 2 ← a 2 + 100 TOT ← TOT + 100
Transaction: collection of actions that preserve consistency
10
Consistent DB T Consistent DB’
If T starts with consistent state + T executes in isolation ⇒ T leaves consistent state
Events Desired
Undesired Expected Unexpected
Desired events: see product manuals….
Undesired expected events: System crash
19
Undesired Unexpected: Everything else!
that’s it!!
Examples:
20
Undesired Unexpected: Everything else!