


















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































For computing the set of FDs that follow a given FD, the following rules called Armstrong’s axioms are useful:
Inference Rules for FD’s
(continued)
Trivial Rule
Why?
A 1 …^ A (^) m
where i = 1, 2, ..., n
A 1 , A 2 , …, An Ai
Inference Rules for FD’s
(continued)
Transitive Closure Rule
If
and
then
Why?
A 1 , A 2 , …, An B 1 , B 2 , …, Bm
B 1 , B 2 , …, Bm C 1 , C 2 , …, Cp
A 1 , A 2 , …, An C 1 , C 2 , …, Cp
Start from the following FDs:
Infer the following FDs:
Inferred FD
Which Rule did we apply ?
If
then
Augmentation follows from trivial rules and transitivity How?
A 1 , A 2 , …, An B
A 1 , A 2 , …, An , C 1 , C 2 , …, Cp B
Augmentation
Given a set of attributes A 1 , …, An
The closure , {A 1 , …, An } +^ , is the set of attributes B s.t. A 1 , …, An B
name color category department color, category price
Example:
Closures: name +^ = {name, color} {name, category}+^ = {name, category, color, department, price} color +^ = {color}
Start with X={A1, …, An}.
Repeat until X doesn’t change do :
if B 1 , …, Bn C is a FD and B 1 , …, Bn are all in X then add C to X. {name, category}^
{name, category, color, department, price}
name color category department color, category price
Example:
Example:
Step 1: Compute X+, for every X: A+ = A, B+ = BD, C+ = C, D+ = D AB+ = ABCD, AC+ = AC, AD+ = ABCD ABC+ = ABD+ = ACD+^ = ABCD (no need to compute– why ?) BCD+^ = BCD, ABCD+ = ABCD
Step 2: Enumerate all FD’s X Y, s.t. Y ⊆ X+^ and X∩Y = ∅:
AB CD, ADBC, ABC D, ABD C, ACD B Docsity.com
Course Dept, Room Dept, Room Course Student, Dept Course, Room Student, Course Dept, Room Student, Room Dept, Course
Do all FDs make sense in practice?