Reduce harmful repetition
Store one independent fact in one logical place whenever the dependencies permit it.
CodeBhavya
Diagnose unsafe table designs and transform them through 1NF, 2NF and 3NF using keys and functional dependencies—not memorized slogans.
Repeated facts are dangerous when one real-world fact must be changed in many rows.
Store one independent fact in one logical place whenever the dependencies permit it.
A department name should not disagree across student-enrolment rows.
Insert, update and delete one fact without unintentionally affecting another fact.
Each relation should describe one focused subject: student, course, department or enrolment.
A decomposition must follow dependencies and later must be checked for lossless join and dependency preservation. Those safety tests are covered in Level 8.
Operate on one denormalized ENROLMENT_RECORD table and observe which independent fact is placed at risk.
| student_id | student_name | dept_id | dept_name | course_id | course_title | grade |
|---|
A relation is in 1NF when each attribute contains values from an atomic domain and there are no repeating groups.
Atomic means indivisible for the database task. A full address may be atomic in one application but should be separated when city or postcode must be searched independently.
No arrays, lists or repeating course_1, course_2, course_3 columns| student_id | phones |
|---|---|
| 101 | 9876, 8765 |
One cell contains multiple phone values.
| student_id | phone |
|---|---|
| 101 | 9876 |
| 101 | 8765 |
Each row contains one phone value.
A relation must be in 1NF, and every non-prime attribute must depend on the whole of every candidate key.
student_id → student_name, dept_id, dept_namePARTIAL
course_id → course_title, instructorPARTIAL
{student_id, course_id} → gradeFULL
student_id and course_id are proper subsets of the composite key. They determine non-prime attributes without requiring the entire key.
student_id, student_name, dept_id, dept_namecourse_id, course_title, instructorstudent_id, course_id, gradeA relation must be in 2NF, and non-prime attributes should not depend transitively on a candidate key through another non-key attribute.
student_id → dept_id and dept_id → dept_name imply student_id → dept_name. Department name belongs with its real determinant, dept_id.
student_id, student_name, dept_id (FK)dept_id, dept_namecourse_id, course_title, instructorstudent_id (FK), course_id (FK), gradeFor every non-trivial FD X → A, either X is a super key or A is prime (belongs to some candidate key).
Move through the normal forms. Every stage identifies the dependency removed and the design concern that remains.
Describe a relation’s properties and receive the highest guaranteed normal form with the first required correction.
The result will explain each normal-form gate in order.
Mark this level when you can diagnose a relation and show every decomposition from 1NF through 3NF with written reasoning.
Saved in this browser only.