Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Database Management

A table Order_Items has composite primary key (Order_ID, Product_ID) and columns Product_Name, Quantity. Product_Name depends only on Product_ID. Which statement is correct?

The table violates Second Normal Form because Product_Name depends on only Product_ID, a part of the composite key. This is a partial dependency. Decomposing into a separate Product table removes it; a composite key by itself does not breach 1NF.

  1. AIt violates 2NF because of a partial dependencyCorrect
  2. BIt violates 3NF only because of a transitive dependency
  3. CIt satisfies 2NF since it is in 1NF
  4. DIt violates 1NF because the key is composite

Explanation

Product_Name depends on only part of the composite key (Product_ID), which is a partial dependency and breaches 2NF. The fix is moving Product_ID and Product_Name to a separate Product table. A composite key alone does not breach 1NF.

Did you get it right without looking?

One question tells you little. A timed set on Database Management shows your real accuracy, how long you take and where you lose marks.

More Database Management questions