





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The importance of data integrity in databases and the role of undo and redo logging in maintaining consistency. It covers concepts such as consistent states, constraints, and transaction execution, as well as potential causes of inconsistencies and methods for prevention and recovery. The document also touches upon the difference between undo and redo logging and their respective rules.
Typology: Slides
1 / 37
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!