Bird
0
0

Consider the following table:

easy📝 Conceptual Q2 of 15
SQL - Database Design and Normalization
Consider the following table:
CREATE TABLE ProductOrders (OrderID INT, ProductID INT, ProductDescription VARCHAR(100), Quantity INT, PRIMARY KEY (OrderID, ProductID));
Which statement is true regarding its 2NF compliance?
AIt violates 2NF because ProductDescription depends only on ProductID.
BIt is in 2NF because all columns depend on the full primary key.
CIt violates 2NF because Quantity depends only on OrderID.
DIt is in 2NF because ProductDescription is a key attribute.
Step-by-Step Solution
Solution:
  1. Step 1: Identify primary key

    The primary key is composite: (OrderID, ProductID).
  2. Step 2: Check dependencies

    ProductDescription depends only on ProductID, a part of the key, causing partial dependency.
  3. Final Answer:

    It violates 2NF because ProductDescription depends only on ProductID. -> Option A
  4. Quick Check:

    Partial dependency found on ProductDescription [OK]
Quick Trick: Check if non-key columns depend on part of composite key [OK]
Common Mistakes:
  • Assuming all columns depend on full key without checking
  • Confusing 2NF with 1NF
  • Ignoring partial dependencies on composite keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes