Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
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 | |
|---|---|---|
| 1PRIMARY KEY (studentId, subjectId) | AA composite key made of two fields. 2NF checks every other field against the whole key, not just one part. | |
| 2subjectName depends on subjectId only | BResults(studentId, subjectId, mark) | |
| 3To fix a partial dependency, move the partly dependent field into a new table keyed by that part of the key | CSubjects(subjectId, subjectName) | |
| 4A table in 2NF has every non-key field depending on the whole composite key, such as a mark for one student in one subject | DA partial dependency: the field relies on part of the composite key, so the table breaks 2NF. | |
| 5Results(studentId, subjectId, mark, studentName) | EstudentName depends only on studentId, which is part of the key. This partial dependency means the table is not in 2NF. | |
| 6Orders(orderId, productId, quantity, productName) PK: orderId, productId | FproductName depends only on productId, not on the whole key of orderId and productId, so the table breaks 2NF. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
2NF — Second normal form: the table is in 1NF and every non-key field depends on the WHOLE primary key, so no field depends on only part of a composite key. Move partial fields to their own table.OrderItem(orderId, productId, qty, name)
PRIMARY KEY (orderId, productId)Key: (orderId, productId)
productId -> nameOrderItem(orderId, productId, qty)
Product(productId, name)FOREIGN KEY (productId)
REFERENCES product(productId)2NF = 1NF + no partial dependency