DBMS & SQLLevel 7
PART 2 • CORRECT DATABASE DESIGN

Remove Redundancy Without Losing Meaning

Diagnose unsafe table designs and transform them through 1NF, 2NF and 3NF using keys and functional dependencies—not memorized slogans.

Level 07 of 18Intermediate120–160 minutesLevel 6 required
BY THE END, YOU CAN
  • Identify insertion, update and deletion anomalies.
  • Verify atomic values for 1NF.
  • Remove partial dependencies for 2NF.
  • Remove transitive dependencies for 3NF.
  • Explain each decomposition using FDs.
  • State the highest normal form reached.
01 • START WITH THE DESIGN PROBLEM

Normalization Controls Redundancy and Its Side Effects

Repeated facts are dangerous when one real-world fact must be changed in many rows.

01

Reduce harmful repetition

Store one independent fact in one logical place whenever the dependencies permit it.

02

Protect consistency

A department name should not disagree across student-enrolment rows.

03

Make changes safer

Insert, update and delete one fact without unintentionally affecting another fact.

04

Clarify responsibility

Each relation should describe one focused subject: student, course, department or enrolment.

Normalization is not “split every table.”

A decomposition must follow dependencies and later must be checked for lossless join and dependency preservation. Those safety tests are covered in Level 8.

UNFRepeating groups→ atomic values1NFPartial dependencies may remain→ remove partial2NFTransitive dependencies may remain→ remove transitive3NFNon-key facts depend on keys
02 • EXPERIENCE THE FAILURE

Anomaly Laboratory

Operate on one denormalized ENROLMENT_RECORD table and observe which independent fact is placed at risk.

student_idstudent_namedept_iddept_namecourse_idcourse_titlegrade
03 • FIRST NORMAL FORM

1NF Gives Every Cell One Atomic Value

A relation is in 1NF when each attribute contains values from an atomic domain and there are no repeating groups.

1NF TEST

One row × one attribute = one value

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
NOT 1NF
student_idphones
1019876, 8765

One cell contains multiple phone values.

1NF
student_idphone
1019876
1018765

Each row contains one phone value.

04 • SECOND NORMAL FORM

2NF Removes Partial Dependency on a Candidate Key

A relation must be in 1NF, and every non-prime attribute must depend on the whole of every candidate key.

CANDIDATE KEY{student_id, course_id}

student_id → student_name, dept_id, dept_namePARTIAL

course_id → course_title, instructorPARTIAL

{student_id, course_id} → gradeFULL

Why the first two dependencies violate 2NF

student_id and course_id are proper subsets of the composite key. They determine non-prime attributes without requiring the entire key.

STUDENT_2NFstudent_id, student_name, dept_id, dept_name
COURSE_2NFcourse_id, course_title, instructor
ENROLMENT_2NFstudent_id, course_id, grade
05 • THIRD NORMAL FORM

3NF Removes Transitive Non-Key Determination

A relation must be in 2NF, and non-prime attributes should not depend transitively on a candidate key through another non-key attribute.

student_idkeydept_idnon-key determinantdept_namenon-key fact

student_id → dept_id and dept_id → dept_name imply student_id → dept_name. Department name belongs with its real determinant, dept_id.

STUDENTstudent_id, student_name, dept_id (FK)
DEPARTMENTdept_id, dept_name
COURSEcourse_id, course_title, instructor
ENROLMENTstudent_id (FK), course_id (FK), grade
FORMAL 3NF CONDITION

For every non-trivial FD X → A, either X is a super key or A is prime (belongs to some candidate key).

The common “no transitive dependency” rule is a useful learning test, while this formal condition handles schemas with multiple candidate keys accurately.
06 • WATCH THE SCHEMA CHANGE

Guided Decomposition Visualizer

Move through the normal forms. Every stage identifies the dependency removed and the design concern that remains.

07 • DIAGNOSE, DO NOT GUESS

Highest Normal Form Diagnostic

Describe a relation’s properties and receive the highest guaranteed normal form with the first required correction.

1. Are all values atomic with no repeating groups?
2. Does a non-prime attribute depend on only part of a candidate key?
3. Does a non-prime attribute determine another non-prime attribute?
READY

Describe the dependency conditions

The result will explain each normal-form gate in order.

08 • CHECK YOUR UNDERSTANDING

Eight Formative Concept Checks

1. Which situation is an update anomaly?

2. The central 1NF requirement is:

3. For key {student_id, course_id}, student_id → student_name is:

4. Which normal form removes partial dependencies?

5. student_id → dept_id and dept_id → dept_name create:

6. A 2NF relation with no transitive non-key dependency reaches:

7. A relation with a single-attribute candidate key is in 1NF. Which is impossible?

8. Which statement is most accurate?

Answered correctly: 0 of 8
09 • EXPLAIN & PREPARE

University and Interview Questions

2-MARK QUESTIONS
  1. Define normalization.
  2. What is an update anomaly?
  3. State the condition for 1NF.
  4. Define partial dependency.
  5. Define transitive dependency.
5-MARK / PROBLEMS
  1. Explain insertion, update and deletion anomalies with one table.
  2. Normalize a relation from UNF to 1NF.
  3. Convert a relation with a composite key into 2NF.
  4. Normalize a 2NF relation into 3NF using its FDs.
INTERVIEW QUESTIONS
  1. Can a 1NF table still contain redundancy?
  2. Why does 2NF matter mainly for composite keys?
  3. What is the formal 3NF condition?
  4. Normalization versus denormalization?
  5. How would you validate a decomposition?
Show the step-by-step normalization answer format
  1. Write the relation and all candidate keys.
  2. List the valid functional dependencies.
  3. State the current normal form and prove why.
  4. Identify the exact violating dependency.
  5. Decompose relations with primary and foreign keys marked.
  6. Repeat the dependency test on every new relation.
  7. State the final normal form.
  8. Mention lossless join and dependency preservation as required safety checks.

You Can Now Move a Schema from Repetition to 3NF

  • Anomalies expose harmful redundancy.
  • 1NF requires atomic values and removes repeating groups.
  • 2NF removes partial dependency of non-prime attributes on candidate keys.
  • 3NF removes transitive non-key determination.
  • Every decomposition must be justified by keys and dependencies.
  • Formal 3NF permits X → A when X is a super key or A is prime.
COURSE CHECKPOINT

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.