Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Third normal form (3NF) (Prototype Data Solutions) worksheet is part of the QCE Digital Solutions Unit 2 — Prototype Data Solutions journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 13NF | A3NF: every non-key field depends on the key, and house details are held in a separate House table | |
| 2Student(studentId, name, houseId) | BhouseCaptain depends on houseId (a non-key field), not on studentId. This is a transitive dependency, so the table is not in 3NF. | |
| 3A transitive dependency is when a non-key field depends on another non-key field, not directly on the primary key | CstudentId -> houseId -> houseCaptain | |
| 4To reach 3NF, move the fields that depend on a non-key field into their own table, linked by a foreign key | DA table in 2NF where no non-key field depends on another non-key field | |
| 5Student(studentId, name, houseId, houseCaptain) | EHouse(houseId, houseName, houseCaptain) | |
| 6Product(productId, name, categoryId, categoryName) | FcategoryName depends on categoryId, which is a non-key field. Storing it here repeats the category name and breaks 3NF. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
3NF — A table in 2NF where no non-key field depends on another non-key field (no transitive dependency). Every field depends on the key, the whole key and nothing but the key.CREATE TABLE House (
houseId INTEGER PRIMARY KEY,
houseHead TEXT);CREATE TABLE Student (
studentId INTEGER PRIMARY KEY,
houseId INT REFERENCES House(houseId));SELECT Student.firstName, House.houseHead
FROM Student JOIN House
ON Student.houseId = House.houseId;ALTER TABLE Student DROP COLUMN houseHead;Student(studentId, firstName, houseId)
House(houseId, houseHead)