DBMS Functional Dependency, Closure & Normalization Calculator
Compute attribute closures (X+), find all candidate keys, derive canonical minimal covers, diagnose 1NF/2NF/3NF/BCNF violations, and generate lossless 3NF synthesis and BCNF decompositions.
How to Normalize a Relational Schema in 3 Steps
Enter the relation's attributes (e.g., A, B, C, D, E or StudentID, CourseID, Grade) and list one functional dependency per line using ->.
Inspect the sticky verdict panel for Candidate Keys, Prime vs. Non-Prime attributes, and the highest satisfied Normal Form (1NF through BCNF).
Switch between Diagnosis, Closure Explorer, Minimal Cover, and 3NF/BCNF Decomposition tabs to trace every proof step.
Database Management Systems Normalization Lab Challenge
Unique Dataset per Student IDEnter your instructor's Activity Code and your Student ID to generate a deterministic practice dataset and verifiable lab ticket.
🔒 Student IDs are processed 100% locally in your browser and never stored on our servers.
Note: Every student receives different numbers to prevent copying a classmate's screenshot. This ticket is an automated integrity check for classroom labs; for high-stakes exams, pair with your official LMS.
Relational Schema & Functional Dependency Workbench
Compute attribute closures, all candidate keys, canonical cover, normal form proofs, and lossless 3NF / BCNF decompositions.
Separate with commas or spaces (max 14 attributes).
Prime Attributes (Part of a Candidate Key)
Non-Prime Attributes
Dependency Audit Log
Toggle Attributes in X to Compute X⁺
Resulting Closure
| Step | Rule / FD Applied | Added | Closure Set |
|---|---|---|---|
Canonical Cover (Grouped by LHS)
Reduction Steps Applied
No extraneous LHS attributes or redundant dependencies found — the input set is already minimal.
3NF Synthesis Tables
Lossless + Preserves FDs, )
BCNF Decomposition
Zero FD Redundancy, )
Click any key to inspect its Armstrong closure proof.
- Attributes
- Parsed FDs
- 2NF Partial Violations
- 3NF Transitive Violations
- BCNF Determinant Violations
Relational Normalization Rules: 1NF to BCNF Explained
Normalization removes update, insertion, and deletion anomalies from relational database tables by splitting poorly grouped attributes into clean, single-purpose tables. Every formal normal form test starts by computing all candidate keys using Armstrong's axioms (Reflexivity, Augmentation, and Transitivity).
| Normal Form | Formal Condition (For every non-trivial FD X → A) | What Fails It |
|---|---|---|
| 1NF | Every column holds atomic (indivisible) values; no repeating groups. | Comma-separated lists inside one cell (e.g., "CS101, IT202"). |
| 2NF | In 1NF, and no non-prime attribute depends on a proper subset of any candidate key. | Partial dependency (only possible when a candidate key is composite). |
| 3NF | In 2NF, and either X is a superkey OR A is a prime attribute. | Transitive dependency (e.g., StudentID → DeptID → DeptChair). |
| BCNF | For every non-trivial FD X → A, X must be a superkey. | A non-superkey determining a prime attribute in overlapping keys. |
Worked Example: Why R(Student, Course, Instructor) Is 3NF but Not BCNF
Suppose each student can enroll in a course with one instructor (Student, Course → Instructor), and each instructor teaches only one course (Instructor → Course):
- Candidate Keys:
{Student, Course}⁺ = {Student, Course, Instructor}and{Student, Instructor}⁺ = {Student, Instructor, Course}. Both are minimal, so there are two candidate keys. - Prime Attributes:
Student,Course, andInstructorall appear in at least one candidate key—there are zero non-prime attributes, so 2NF and 3NF pass automatically. - BCNF Check: Look at
Instructor → Course. Its closure is{Instructor, Course}(missingStudent), soInstructoris not a superkey. The table fails BCNF. - BCNF Split: Decompose into
B1(Instructor, Course)andB2(Student, Instructor). Note that while this removes redundancy, checkingStudent, Course → Instructornow requires joiningB1andB2.
Frequently Asked Questions
How do you find the attribute closure (X+) of a set of attributes?
Start with the given attribute set X. Repeatedly scan every functional dependency A -> B: whenever all attributes in A are already in your current set, add all attributes in B. Stop when a full pass adds no new attributes. If X+ equals all attributes of relation R, then X is a superkey.
What is the difference between a superkey and a candidate key?
A superkey is any set of attributes whose closure contains every attribute in the table. A candidate key is a minimal superkey—removing any single attribute from it breaks its ability to uniquely determine the rest of the relation.
How can you tell whether a relation fails 2NF, 3NF, or BCNF?
Assume atomic values (1NF). A table fails 2NF if a proper subset of a candidate key determines a non-prime attribute (partial dependency). It fails 3NF if a non-superkey determines a non-prime attribute (transitive dependency). It fails BCNF if any non-trivial functional dependency X -> Y has a left-hand side X that is not a superkey—even when Y is a prime attribute.
Can a table be in 3NF but NOT in BCNF?
Yes. The classic example is R(Student, Course, Instructor) with {Student, Course} -> Instructor and Instructor -> Course. The candidate keys are {Student, Course} and {Student, Instructor}, so every attribute is prime. Because Course is prime, 3NF is satisfied—yet Instructor -> Course violates BCNF because Instructor is not a superkey.
When should I choose 3NF synthesis over BCNF decomposition?
3NF synthesis always guarantees both a lossless join and dependency preservation, meaning every business rule can be enforced without cross-table joins. BCNF eliminates all FD-based redundancy and guarantees a lossless join, but in overlapping-key schemas it may lose a functional dependency across split tables.
Academic References, Official Standards & Statutory Sources
Peer-reviewed literature, DepEd orders, CHED memoranda, and verified empirical guidelines.
A Relational Model of Data for Large Shared Data Banks
Codd, E. F. (1970). A relational model of data for large shared data banks. Communications of the ACM, 13(6), 377–387. https://doi.org/10.1145/362384.362685
Dependency Structures of Data Base Relationships (Armstrong's Axioms)
Armstrong, W. W. (1974). Dependency structures of data base relationships. Information Processing 74: Proceedings of IFIP Congress 74, 580–583.
Recent Investigations in Relational Data Base Systems (Boyce-Codd Normal Form)
Codd, E. F. (1974). Recent investigations in relational data base systems. Information Processing 74: Proceedings of IFIP Congress 74, 1017–1021.
Database System Concepts (7th ed.) – Chapter 7: Relational Database Design
Silberschatz, A., Korth, H. F., & Sudarshan, S. (2020). Database system concepts (7th ed., Chapter 7: Relational Database Design). McGraw-Hill.
Questions, Help & Academic Discussion
0Have questions about DBMS Functional Dependency, Closure & Normalization Calculator calculations, DepEd/CHED formulas, or thesis interpretation? Ask here or help fellow scholars!
No questions asked yet
Be the first to ask a question about interpreting formulas or using DBMS Functional Dependency, Closure & Normalization Calculator!
✏️ Leave a Comment or Ask a Question
100% free and open for Filipino students, teachers, and thesis writers. No account required.