Database Normalization Helper (1NF to BCNF)

Finds attribute closures, all candidate keys, prime attributes and the minimal cover, checks 2NF, 3NF and BCNF with reasons, and builds 3NF and BCNF decompositions.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Enter attributes

    Type the attribute names separated by commas, or letters such as ABCDE.

  2. 2
    Enter dependencies

    Write one functional dependency per line using ->.

  3. 3
    Read the analysis

    Check the candidate keys, prime attributes, highest normal form and the reasons.

  4. 4
    See the minimal cover

    Read the canonical set of dependencies below the checks.

  5. 5
    Decompose

    Open Decompose for the 3NF synthesis and the BCNF split steps.

  6. 6
    Compute closures and practise

    Use Attribute closure to test any set, then try Practice questions.

Informazioni su questo strumento

Normalization is the process of splitting a database table so that each fact is stored once, which prevents update, insertion and deletion anomalies. Database courses teach it through functional dependencies: rules such as StudentID → StudentName, saying that one set of attributes determines another. From the dependencies you find the candidate keys, decide which normal form the table is in and decompose it if needed. The steps are mechanical but long, and one missed closure gives a wrong key. This helper does the full analysis for up to 14 attributes, using real attribute names or single letters. It shows closures step by step, lists every candidate key, explains each normal-form check, computes the minimal cover and produces both a 3NF synthesis and a BCNF decomposition.

Closures and keys

The closure X⁺ of a set of attributes X is everything X determines. Start with X and repeatedly apply any dependency whose left side is already inside, adding its right side. If X⁺ contains every attribute, X is a superkey; a minimal superkey is a candidate key. The tool finds all candidate keys efficiently by noting that attributes that never appear on a right side must be in every key, then testing combinations of the rest from smallest to largest.

The normal forms

- **1NF**: values are atomic and there are no repeating groups. The tool assumes this. - **2NF**: no non-prime attribute (one not in any candidate key) depends on only part of a candidate key. - **3NF**: for every non-trivial dependency X → A, either X is a superkey or A is prime. This removes transitive dependencies through non-key attributes. - **BCNF**: for every non-trivial dependency X → A, X is a superkey.

The analysis tab lists the dependencies that break each form, so you can see exactly why a table fails.

Minimal cover

A minimal (canonical) cover expresses the same constraints with single attributes on the right, no unnecessary attributes on the left and no redundant dependencies. It is the starting point for 3NF synthesis.

Decomposition

The 3NF synthesis algorithm creates one table for each group of dependencies in the minimal cover with the same left side, adds a table containing a candidate key if none has one, and drops tables contained in others. The result is lossless and preserves every dependency. The BCNF algorithm repeatedly splits a table on a dependency that violates BCNF into X⁺ and the rest; the result is lossless but some dependencies may span tables.

Worked example

Student(StudentID, CourseID, StudentName, CourseTitle, Grade) with StudentID → StudentName, CourseID → CourseTitle and StudentID, CourseID → Grade. The only key is {StudentID, CourseID}. StudentName depends on part of that key, so the table is only in 1NF. The 3NF synthesis gives three tables: (StudentID, StudentName), (CourseID, CourseTitle) and (StudentID, CourseID, Grade).

Limits

The helper works only from the dependencies you enter; it cannot discover them from data, and real schema design also involves multivalued dependencies (4NF), performance and business rules. With more than 12 attributes the dependency projection used in BCNF decomposition is simplified.

Esempio svolto

Key {StudentID, CourseID}; StudentID → StudentName is partial → 1NF; 3NF tables: Students, Courses, Grades.

In breve

Domande frequenti

What is a functional dependency?

A rule X → Y meaning that any two rows with the same X values must have the same Y values, such as StudentID → StudentName.

How do I enter dependencies?

One per line as left -> right, with attribute names separated by commas, or single letters such as AB -> C.

What is a prime attribute?

An attribute that belongs to at least one candidate key.

Why might BCNF lose a dependency?

Splitting on a violating dependency can put the attributes of another dependency in different tables, so it can no longer be checked inside one table.

Is 3NF always possible without losing dependencies?

Yes. The synthesis algorithm always gives a lossless, dependency-preserving 3NF design.

How many attributes can I use?

Up to 14, which covers textbook and exam problems.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue