$ ./guess_the_languageSQL & Databases
SQL & Databases · hard · #33

Which normal form does this table violate first?

order_items(order_id, product_id, qty, product_name)
-- key: (order_id, product_id)
-- product_name depends only on product_id
  1. First normal form (1NF)
  2. Boyce-Codd normal form (BCNF)
  3. Second normal form (2NF)
  4. Third normal form (3NF)
product_name depends on only part of the composite key, a partial dependency that 2NF forbids.
Play SQL & Databases ▸