Integrity and Correctness of Data

3/2/99


Click here to start


Table of Contents

Integrity and Correctness of Data

Can a DB be Always Consistent ? No, Transactions are the Unit of Consistency

In the Next Episodes

Failure Model

Important Operations of a Transaction

Key Problem: Unfinished Transactions

UnDo Logging

Undo Logging Rules

Undo Logging Recovery Rules

Redo Logging (Deferred Modification)

Redo Logging Recovery Rules + Checkpoints

Buffering Requirements of Undo/Redo

Undo/Redo Logging

Real World Actions

Concurrency Control

Serializable and Non-Serializable Schedules

May Swap Non-Conflicting Read/Write Statements

Conflict

Testing for Serializability

Testing for Serializability (example)

How to Enforce Serializable Schedules ?

2PL is needed for Serializability

2PL causes deadlocks

The Set of 2PL Schedules is Subset of the Set of Serializable Schedules

Shared Locks

Shared Locks (cont’d)

An Alternative Definition of Correctness: View Serializability

Increment Locks

How does locking work in practice ?

Cascading Aborts and Strict 2-Phase Lock (2PL)

Granularity of locks

Author: ucsd