**Tom Kelliher, CS 318**

**Mar. 8, 2002**

Return homework Monday. Midterm review Monday. Midterm will cover Chapters 1--7.

Introduction to functional dependencies.

- Demonstrating entailment.
- Entailment checking algorithm.
- Entailment checking example.

Midterm review.

Using Armstrong's Axioms:

- .
- entails
.
- and entail .

- and entail . (Union)
- entails and .
(Decomposition)

- Generally, when normalizing, we're interested in knowing if .
- Armstrong's axioms are
*sound*and*complete*.Therefore, an algorithm exists to do entailment checking.

- Suppose we want to see if .
- We check this by seeing if is in the attribute closure
of with respect to .
- This closure is defined:
- implies
for each .
By the union property then, .

- Note that .
Why?

- This closure is defined:
- Attribute closure algorithm:
closure :=

repeat

old := closure

if there is an FD such that then

closure :=

until old = closure

return closure`Correctness. Use induction. (Not the entire proof.)`- Basis. .
Observe . Why?

By decomposition, .

- Inductive step. Assume .
Suppose we have where .

*Justify each of the following steps.*Observe .

So .

Therefore .

- Basis. .

Suppose we have , where and contains

Thu Mar 7 18:46:49 EST 2002