Finding Closure of Attributes and Attribute Sets
Subject: DBMS
Contributed By: Nunugoppula Ajay
Created At: April 17, 2026
Question:
Finding Closure of Attributes and Attribute Sets with Example
Explanation:
1. Introduction
In DBMS, attribute closure is a fundamental concept used in functional dependency analysis. It helps in:
- Identifying all attributes functionally determined by a given attribute set
- Checking candidate keys
- Verifying normal forms (like 2NF, 3NF, BCNF)
2. What is Attribute Closure?
The closure of an attribute set X, denoted as X⁺ (X plus), is the set of all attributes that can be functionally determined from X using the given functional dependencies.
Definition
If X is a set of attributes, then:
X⁺ = { all attributes that can be derived from X using functional dependencies }
3. Why is Attribute Closure Important?
Attribute closure is used to:
- Determine whether an attribute set is a super key
- Find candidate keys
- Check whether a functional dependency is valid
- Assist in normalization
4. Steps to Find Attribute Closure
To find X⁺ (closure of X):
- Start with X⁺ = X
- Apply all functional dependencies repeatedly
- If a dependency A → B exists and A ⊆ X⁺, then add B to X⁺
- Repeat until no new attributes can be added
5. Example Problem
Given:
Relation:
R(A, B, C, D, E, F, G)
Functional Dependencies:
- A → BC
- BC → DE
- D → F
- CF → G
Find:
- Closure of (A)
- Closure of (D)
- Closure of (B, C)
6. Finding Closure of A (A⁺)
Step 1:
Start with:
A⁺ = {A}
Step 2:
Apply A → BC
A⁺ = {A, B, C}
Step 3:
Apply BC → DE
A⁺ = {A, B, C, D, E}
Step 4:
Apply D → F
A⁺ = {A, B, C, D, E, F}
Step 5:
Apply CF → G
Since C and F are in A⁺
A⁺ = {A, B, C, D, E, F, G}
Final Result:
A⁺ = {A, B, C, D, E, F, G}
Conclusion:
A⁺ contains all attributes → A is a candidate key
7. Finding Closure of D (D⁺)
Step 1:
D⁺ = {D}
Step 2:
Apply D → F
D⁺ = {D, F}
Step 3:
No further dependencies apply
Final Result:
D⁺ = {D, F}
Conclusion:
D is not a candidate key
8. Finding Closure of (B, C) ((BC)⁺)
Step 1:
(BC)⁺ = {B, C}
Step 2:
Apply BC → DE
(BC)⁺ = {B, C, D, E}
Step 3:
Apply D → F
(BC)⁺ = {B, C, D, E, F}
Step 4:
Apply CF → G
(C and F are present)
(BC)⁺ = {B, C, D, E, F, G}
Final Result:
(BC)⁺ = {B, C, D, E, F, G}
Conclusion:
(BC) is not a candidate key (A is missing)
9. Summary of Results
Attribute Set | Closure | Candidate Key |
A | {A, B, C, D, E, F, G} | Yes |
D | {D, F} | No |
(B, C) | {B, C, D, E, F, G} | No |
10. Key Observations
- Closure helps determine reachability of attributes
- If X⁺ contains all attributes → X is a super key
- Minimal super keys are candidate keys
- Closure calculation is iterative and rule-based
11. Important Points for Exams
- Always start with X⁺ = X
- Apply functional dependencies step-by-step
- Clearly show each expansion
- Final closure must include all derived attributes
- Identify whether it forms a candidate key