Bird
0
0

Analyze the table:

medium📝 Debug Q7 of 15
SQL - Database Design and Normalization
Analyze the table:
CREATE TABLE Registration (StudentID INT, ClassID INT, StudentEmail VARCHAR(100), PRIMARY KEY (StudentID, ClassID));
StudentEmail depends only on StudentID. What is the issue related to 2NF?
APrimary key is not defined correctly.
BStudentEmail causes a partial dependency violating 2NF.
CStudentEmail depends on both StudentID and ClassID.
DThere is no violation; table is in 2NF.
Step-by-Step Solution
Solution:
  1. Step 1: Identify primary key

    The primary key is composite: (StudentID, ClassID).
  2. Step 2: Check dependencies

    StudentEmail depends only on StudentID, a part of the composite key, causing partial dependency.
  3. Final Answer:

    StudentEmail causes a partial dependency violating 2NF. -> Option B
  4. Quick Check:

    Partial dependency on StudentEmail found [OK]
Quick Trick: Partial dependency on composite key attribute breaks 2NF [OK]
Common Mistakes:
  • Assuming single attribute dependencies are allowed
  • Ignoring composite key structure
  • Confusing 2NF with 3NF

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes