#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · DBMS NORMALISATION

Attribute Closure Calculator: Work Out X⁺ the Way Your DBMS Exam Expects

Enter a relation, its functional dependencies and a set of attributes to get the closure with every step.

  • 🔑 Superkey check
  • 🧮 Every step shown
  • 📝 Exam-style working

How to use the Attribute Closure Calculator

  1. 1. List the attributesSingle letters like A B C D E, or names separated by spaces.
  2. 2. Add the FDsOne per line, like AB -> C.
  3. 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}⁺:

  1. Start: {A, D}.
  2. A → B applies, so add B: {A, D, B}.
  3. B → C applies, so add C: {A, D, B, C}.
  4. 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.

More free tools

See all free tools