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 | |
|---|---|---|
| 1Ava Nguyen, 12 Pine St | Order 1 | Pencil Ava Nguyen, 12 Pine St | Order 2 | Notebook Ava Nguyen, 12 Pine St | Order 3 | Ruler | AThe same customer details are repeated on every order row, which is data redundancy and wastes space. | |
| 2Ava Nguyen, 12 Pine St Ava Nguyen, 12 Pine Street Ava Nguyen, 12 Pyne St | BChanging just one row leaves the old address on the other rows, so the data is inconsistent. With one big table every row would need updating, or the address should be stored once. | |
| 3Changing a customer's address in one big table means editing every order row, and missing one leaves inconsistent data. | CSELECT orders.orderId, customers.address FROM orders JOIN customers ON orders.customerId = customers.customerId; | |
| 4A relational database stores the address once in a customers table and links each order to it, so only one row needs to change. | DCopying the address onto every order row repeats data. It wastes space and makes updates and typos more likely. Store it once in a customers table instead. | |
| 5Fix: put the customer's address on every order row so it is easy to find. | EUPDATE orders SET address = '5 Oak Rd' WHERE customer = 'Ava Nguyen'; | |
| 6Customer moved house, so change only the first order row in the table. | FTyping errors and different spellings creep into repeated data, so the same address no longer matches. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
data redundancy — The same details stored again and again in one big table. It wastes space and risks typos or missed updates, like a customer's address copied onto every order.UPDATE orders
SET address = '12 Oak St'
WHERE customer = 'Ava';SELECT COUNT(*) FROM orders
WHERE customer = 'Ava';SELECT DISTINCT address
FROM orders
WHERE customer = 'Ava';CREATE TABLE customers (
customerId INT PRIMARY KEY,
address VARCHAR(50));SELECT orders.orderId, customers.address
FROM orders JOIN customers
ON orders.customerId = customers.customerId;