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 | |
|---|---|---|
| 1UPDATE students SET address = '5 Park St' WHERE studentId = 3; | AThe address is repeated in several rows, and only one copy was changed. The old rows still show the old address, which is an update anomaly. | |
| 2UPDATE students SET address = '5 Park St' WHERE address = '12 Hill Rd'; | BRow 1: Ava, 5 Park St | Row 2: Ava, 12 Hill Rd | |
| 3Redundancy causes update anomalies because the same address is stored in many rows, so each copy must be changed separately. | CChanges every row that holds the old address, so all copies of the repeated fact stay in agreement and no update anomaly is left behind. | |
| 4An update anomaly shows up when one customer has two different addresses after a change was made in only one row. | DOrders: (1, Ava, 12 Hill Rd), (2, Ava, 12 Hill Rd), (3, Ava, 12 Hill Rd) | |
| 5A student moves house. The office edits the address in their latest order row only, and leaves the older order rows alone. | EChanges the address in only one row. If the same address is repeated in other rows, those copies stay old and the data disagrees (an update anomaly). | |
| 6Fix: keep the address in every order row and just try to remember to update all of them each time. | FRelying on memory to update every copy does not remove the redundancy that causes the anomaly. Mistakes will still happen. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
update anomaly — A problem where a repeated fact is changed in one row but not its other copies, so the data disagrees. Caused by redundancy, and fixed by normalisation.UPDATE Orders SET address = '5 Elm St'
WHERE orderId = 1;UPDATE Orders
SET address = '5 Elm St'
WHERE orderId = 1;SELECT DISTINCT address FROM Orders
WHERE custId = 3;UPDATE Customers SET address = '5 Elm St'
WHERE custId = 3;SELECT COUNT(*) FROM Orders
WHERE custId = 3;