Bird
0
0

Identify the error in this table design violating 2NF:

medium📝 Debug Q6 of 15
SQL - Database Design and Normalization
Identify the error in this table design violating 2NF:
CREATE TABLE Orders (OrderID INT, ProductID INT, ProductName VARCHAR(50), PRIMARY KEY (OrderID, ProductID));
ProductName depends only on ProductID.
AThere is no error; table is in 2NF.
BOrderID should be the only primary key.
CProductName causes partial dependency on ProductID.
DProductName should be part of the primary key.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze dependency

    ProductName depends only on ProductID, part of composite key.
  2. Step 2: Identify 2NF violation

    This partial dependency violates 2NF rules.
  3. Final Answer:

    ProductName causes partial dependency on ProductID. -> Option C
  4. Quick Check:

    Partial dependency breaks 2NF [OK]
Quick Trick: Partial dependency on part of key breaks 2NF [OK]
Common Mistakes:
  • Thinking primary key must be single column
  • Adding non-key columns to primary key
  • Ignoring partial dependencies

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes