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 | |
|---|---|---|
| 1WHERE email IS NULL | ANULL cannot be tested with =, so this returns no rows and the missing values are not found. It should be WHERE house IS NULL. | |
| 2SELECT COUNT(*) - COUNT(phone) FROM students; | BlastName VARCHAR(30) NOT NULL | |
| 3A required field must not be left empty, so the table stops a record being saved without it | CSELECT s.firstName FROM students s LEFT JOIN results r ON s.studentId = r.studentId WHERE r.studentId IS NULL; | |
| 4Missing records are found by looking for a parent record with no matching rows in the related table | DFinds records where the email value is missing, so the data is incomplete for that field | |
| 5SELECT * FROM students WHERE house = NULL; | ECounts how many records have no phone value, because COUNT(phone) skips NULLs | |
| 6INSERT INTO students (studentId, firstName) VALUES (11, 'Kai'); | FThe record is incomplete because required fields like lastName and yearLevel are not given a value, so they are NULL. Every required field needs a value. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
completeness — Data quality where every record has a value in each required field and no needed records are missing. In SQL, a missing value shows as NULL.SELECT * FROM students
WHERE house IS NULL;SELECT * FROM products
WHERE stock IS NULL;SELECT firstName FROM students
WHERE points IS NOT NULL;SELECT firstName FROM students
WHERE studentId NOT IN
(SELECT studentId FROM results);CREATE TABLE club (
name VARCHAR(30) NOT NULL
);