Normalisation to Third Normal Form · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Normalising an orders table

Computing · Computer Systems · ages 17-18
Name ______________________   Date ____________
  1. Jobs(JobID, TeamID, TeamName) is in 2NF. JobID is its sole candidate key. TeamID and TeamName are non-key fields, and TeamID determines TeamName. Which split removes this transitive dependency for 3NF while preserving each job's team?

    • Teams(TeamID key, TeamName); Jobs(JobID key, TeamID foreign key to Teams).
    • Teams(TeamID key, TeamName); Jobs(JobID key, TeamID, TeamName).
    • Teams(TeamID key, TeamName); Jobs(JobID key), with no stored team reference.
  2. Contact 5 stores exactly two phone numbers, Phone A and Phone B, as a list in one cell. Use the lesson's 1NF convention: one phone value per cell and no repeating numbered phone columns. Which change meets these rules while keeping the contact link?

    • Keep the contact ID and store both phones together in a larger text cell.
    • Keep the contact ID and store each phone in its separate numbered column.
    • Keep the contact ID and store each phone in its own row for this contact.
  3. Orders has the sole candidate key OrderID and non-key fields CustomerID and CurrentAddress. CustomerID determines CurrentAddress. Having a one-column key guarantees that this table is in 3NF.

    Circle one:   True   False

  4. Product facts exist only in order rows, whose key requires an OrderID. A new product has no orders yet. Which anomaly and table split let you store it without inventing an order?

    • Insertion anomaly: store products under ProductID in Products; order rows keep ProductID to reference them.
    • Insertion anomaly: store products under OrderID in a new table, so each product still needs an order to identify it.
    • Update anomaly: store products under ProductID in Products; order rows keep ProductID to reference them.
  5. Orders 41 and 46 store customer C9's current address. A change updates order 41 but misses order 46. Which anomaly and table split address this problem?

    • Update anomaly: leave current addresses on order rows and remove CustomerID, losing the stored customer reference.
    • Update anomaly: store the address in Customers under CustomerID; keep CustomerID on orders as a reference.
    • Insertion anomaly: store the address in Customers under CustomerID; keep CustomerID on orders as a reference.
  6. Deleting a product's last order row loses its only stored product facts. This deletion anomaly is addressed by storing those facts in Products under ProductID and keeping ProductID as a reference on order rows. Deleting the order row can then leave the product record in place.

    Circle one:   True   False

  7. Tests show that copying each customer's current city onto order rows makes a common report faster. What duty comes with keeping these copies?

    • Treat each copy as independent, allowing different current city values.
    • Erase the customer record, letting orders define different city values.
    • Keep one authoritative source, updating its copies after a city change.
  8. Lines is in 1NF. Its only candidate key is OrderID plus ProductID. ProductName depends on ProductID alone. Which change removes this partial dependency while keeping the product link?

    • Keep ProductName in Lines and add it to the combined OrderID and ProductID key.
    • Move ProductName to Products, keyed by ProductID; keep ProductID in Lines.
    • Move ProductName to Orders, keyed by OrderID, with numbered name columns.
LightMySky · lightmysky.comW1-mt_cbRXVW6KxX-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Normalising an orders table W1-mt_cbRXVW6KxX-s1

  1. Teams(TeamID key, TeamName); Jobs(JobID key, TeamID foreign key to Teams). · JobID determines TeamID, which determines TeamName. Store TeamName in Teams under TeamID and remove it from Jobs. Jobs keeps its JobID key and TeamID reference.
  2. Keep the contact ID and store each phone in its own row for this contact. · The stated rules exclude both a phone list in one cell and repeating numbered phone columns. Give each phone its own row and keep contact ID 5 on both rows to preserve ownership.
  3. False · The address depends on OrderID through CustomerID. A one-column key does not remove that transitive dependency.
  4. Insertion anomaly: store products under ProductID in Products; order rows keep ProductID to reference them. · This insertion anomaly makes a product depend on having an order. Products keyed by ProductID can hold the product independently; later order rows reference it.
  5. Update anomaly: store the address in Customers under CustomerID; keep CustomerID on orders as a reference. · This update anomaly leaves conflicting copies of one current address. Store that address in Customers under CustomerID and retain the customer reference on each order.
  6. True · The split separates the product record from its orders. Removing the last order row need not remove the product facts held in Products.
  7. Keep one authoritative source, updating its copies after a city change. · A measured speed benefit does not remove the risk of conflicting copies. The design still needs a consistency plan.
  8. Move ProductName to Products, keyed by ProductID; keep ProductID in Lines. · ProductName belongs with ProductID in Products. Lines retains ProductID as a foreign key, so each line still identifies its product.
Worksheet · LightMySky