How to use the Attribute Closure Calculator
- 1. List the attributesSingle letters like A B C D E, or names separated by spaces.
- 2. Add the FDsOne per line, like AB -> C.
- 3. Find the closureSee each FD applied and whether the set is a key.
What attribute closure is
The closure of a set of attributes X, written X⁺, is every attribute that X determines through the functional dependencies (FDs). It is the basic tool for many DBMS questions:
- Is X a superkey? Yes, if X⁺ contains every attribute of the relation.
- Is X a candidate key? Yes, if it is a superkey and no smaller subset of it is.
- Does an FD X → Y follow from the others? Yes, if Y is inside X⁺.
- Normal forms: checking 2NF, 3NF and BCNF needs keys, which need closures.
The method: start with X, then repeatedly apply any FD whose left side is already inside the closure, adding its right side, until nothing new appears. The tool shows each FD it used and what it added.
Worked example
For R(A, B, C, D, E) with A → B, B → C and CD → E, find {A, D}⁺:
- Start: {A, D}.
- A → B applies, so add B: {A, D, B}.
- B → C applies, so add C: {A, D, B, C}.
- CD → E applies because C and D are both in, so add E: {A, D, B, C, E}.
The closure is {A, B, C, D, E}, every attribute, so AD is a superkey. Neither A⁺ = {A, B, C} nor D⁺ = {D} covers everything, so AD is also minimal: a candidate key. To list every candidate key of a relation automatically, use the Candidate Key Finder.
Frequently asked questions
Can I use attribute names longer than one letter?
Yes. Separate them with spaces, like sid name city, and write FDs the same way: sid -> name city.
What is the difference between a superkey and a candidate key?
A superkey determines every attribute; a candidate key is a superkey with nothing extra, so removing any attribute breaks it.
Can it check normal forms?
Not directly, but closures are the first step for checking 2NF, 3NF and BCNF by hand.
Is the attribute closure calculator free to use?
Yes, the attribute closure calculator is free and costs nothing. Finding your first closure shows a short form for your name and WhatsApp number one time; once that's done, this tool and every other Uncodemy tool open with no form.