4.2Attribute closure X⁺
The idea
The closure X⁺ is everything X determines. You compute it by repeatedly applying FDs whose left side is already inside the set.
Think of it like this: Spreading a rumour: once someone in the group knows the left side, the right side learns it too, and so on until nothing new spreads.
Why it exists
Closure is the one tool behind keys, implication, normal forms and decomposition tests.
How it works
- Start with the set X.
- Find an FD whose left side is inside the current set and add its right side.
- Repeat until no FD adds anything.
- X is a super key if X⁺ is all attributes; X → Y holds if Y ⊆ X⁺.
Worked example: F = {A → B, BC → D, D → E}. Find (AC)⁺.
AC → ABC (A → B) → ABCD (BC → D) → ABCDE (D → E). So (AC)⁺ = ABCDE, AC is a super key.
Now play with it
- →Change the start set in the lab and step through the closure.
- →Find a set of size one that is a super key (none for this F).
- Start with X = AC
- Use A → B: its left side is inside the set, add B → ABC
- Use BC → D: its left side is inside the set, add D → ABCD
- Use D → E: its left side is inside the set, add E → ABCDE
- No FD adds anything new: X⁺ = ABCDE
Check yourself
F = {A → B, B → C}. (A)⁺ is
Exam notes (the dense version)
X⁺ is the set of attributes determined by X. Start with X; repeat: if the left side of an FD is inside the set, add its right side; stop when nothing changes. X → Y follows from F exactly when Y ⊆ X⁺. X is a super key when X⁺ is all attributes. Closure costs one pass per FD, far cheaper than deriving with axioms.
Previous year questions: Functional Dependencies (6)
PYQs are grouped by topic, so this is the full set for Functional Dependencies; try the ones that match this subtopic. Open all 6 on the topic page.