Advanced Database Systems: Notes on Data Integrity and Constraints, Transaction Recovery, Slides of Database Management Systems (DBMS)

Notes on advanced database systems, focusing on data integrity and constraints, transaction recovery, and related topics. It covers concepts such as crash recovery, consistency, constraints, transaction constraints, undo and redo logging, and recovery rules. The document also discusses the importance of preventing and fixing violations of constraints and the role of undo and redo logging in ensuring database consistency.

Typology: Slides

2012/2013

Uploaded on 04/27/2013

dhanapati
dhanapati šŸ‡®šŸ‡³

4.1

(24)

123 documents

1 / 63

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Advanced Database Systems
Notes 10: Failure Recovery
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f

Partial preview of the text

Download Advanced Database Systems: Notes on Data Integrity and Constraints, Transaction Recovery and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

1

Advanced Database Systems

Notes 10: Failure Recovery

2

Schedule

  • Crash recovery (1 lect.) Ch. 17
  • Concurrency control (1.5 lect.) Ch. 18
  • More transaction proc. (1.5 lect.) Ch. 19

4

Integrity or consistency constraints

  • Predicates data must satisfy
  • Examples:
    • x is key of relation R
    • x → y holds in R (functional dependency)
    • Domain(x) = {Red, Blue, Green} āˆ’ α is valid index for attribute x of R
    • no employee should make more than twice the average salary

5

Definition:

  • Consistent state: satisfies all constraints
  • Consistent DB: DB in consistent state

7

Note: could be ā€œemulatedā€ by simple constraints, e.g.,

account (^) Acct # …. balance deleted?

8

Example 2 Database should reflect real world

DB

Reality

Constraints ( as we use here) may

not capture ā€œfull correctnessā€

10

a 2

TOT

.. 50 .. 1000

.. 150 .. 1000

.. 150 .. 1100

Example: a 1 + a 2 +…. a n = TOT ( constraint )

Deposit $100 in a 2 : a 2 ← a 2 + 100 TOT ← TOT + 100

11

Transaction: collection of actions

that preserve consistency

Consistent DB T Consistent DB’

13

Correctness (informally)

  • If we stop running transactions, DB left consistent
  • Each transaction sees a consistent DB

14

How can constraints be violated?

  • Transaction bug
  • DBMS bug
  • Hardware failure e.g., disk crash alters balance of account
  • Data sharing e.g.: T1: give 10% raise to programmers T2: change programmers ⇒ systems analysts

16

Will not consider:

  • How to write correct transactions
  • How to write correct DBMS
  • Constraint checking & repair That is, solutions studied here do not need to know constraints

17

Chapter 17: Recovery

  • First order of business: Failure Model

19

Our failure model

processor

memory disk

CPU

M (^) D

20

Desired events: see product manuals….

Undesired expected events: System crash

  • memory lost
  • cpu halts, resets

Undesired Unexpected: Everything else!

that’s it!!