Problems - Normalization

 Problems

Given:

Relation:
R(A, B, C, D, E)

Functional Dependencies:

  • A → B
  • A → C
  • BC → D
  • D → E
i. Identify the candidate key(s).
ii.Determine whether R is in 1NF, 2NF, and 3NF. Give reasons for each.
iii. If R is not in 3NF, decompose it into 3NF relations.

(i) Find Candidate Key(s)

Step 1: Find closure of A

Compute A+A^+:

  • A → B, C ⇒ {A, B, C}
  • BC → D ⇒ {A, B, C, D}
  • D → E ⇒ {A, B, C, D, E}

👉 A+={A,B,C,D,E}A^+ = \{A, B, C, D, E\}


✅ Conclusion:

  • A determines all attributes
  • So, A is a candidate key

Check others (brief):

  • No smaller subset exists
  • So only one candidate key

✅ Answer:

Candidate Key = {A}


(ii) Normal Forms


✅ 1NF (First Normal Form)

  • Assumes atomic attributes (given in question)

R is in 1NF


✅ 2NF (Second Normal Form)

Rule:

  • No partial dependency on candidate key

👉 Candidate key = A (single attribute)

  • Partial dependency happens only with composite keys
  • Here key is single → no partial dependency possible

R is in 2NF


❌ 3NF (Third Normal Form)

Rule:

For every FD XYX → Y, either:

  1. X is a super key, OR
  2. Y is a prime attribute

Check each FD:

FDStatus
A → B        OK (A is key)
A → C        OK (A is key)
BC → D        ❌ BC is not key
D → E        ❌ D is not key

❌ Violations:

  • BC → D
  • D → E

👉 Non-key attributes determining other attributes


❌ Conclusion:

R is NOT in 3NF


(iii) Decomposition into 3NF

We decompose based on violating FDs.


Step 1: Create relations for each FD

From A → B, C:

R1(A, B, C)

From BC → D:

R2(B, C, D)

From D → E:

R3(D, E)

Step 2: Ensure key is preserved

  • A is present in R1 → OK

✅ Final 3NF Relations:

R1(A, B, C) R2(B, C, D) R3(D, E)

Comments

Popular posts from this blog

Database Management Systems DBMS PCCST402 Semester 4 KTU CS 2024 Scheme

Data Models, Schemas and Instances

Introduction to Database Management System -DBMS