Failures, Transactions, and Logging




CS157b

Chris Pollett

Apr 3, 2023

Outline

Introduction

An Overarching Goal

Possible Kind of Database Errors

Transactions

Jobs of the Transaction Manager

Correct Execution of Transactions

Converse of the Correctness Principle

Primitive Operations of a Transaction

Undo Logging

Log Records

Quiz

Which of the following statements is true?

  1. The number of tuples produced by a natural join is at least linear in the size of the smaller join relation.
  2. To find out the physical plan for a query `q`, in sqlite you can type: ANALYZE `q`.
  3. Pipelining is a technique whereby we pass the output of the sub-query computed so far to the next stage in the query evaluation.

The Undo-Logging Rules

Recovering using Undo Logging

Checkpointing

Nonquiescent Checkpointing