Lecture 18
Lecture 18
Motivation
•
Assume at first A
and B each have
$1000.
Q: What are the
legal outcomes of
running T1 and T2?
Serial Execution Example
Total: 2126
Interleaving Example (Bad)
Total: 2126
Correctness
• Q: How do we judge that a schedule is correct?
Correctness
• Q: How do we judge that a schedule is correct?
• A: If it is equivalent to some serial execution.
Formal Properties of Schedules
• Serial Schedule: A schedule that does not interleave the actions of
different transactions.
• Equivalent Schedules: For any database state, the effect of executing
the first schedule is identical to the effect of executing the second
schedule.*