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 | |
|---|---|---|
| 1SELECT * FROM students WHERE lastName IS NULL; | ACounts the records in the table so you can compare with how many records should be there | |
| 2SELECT COUNT(*) FROM students; | BFinds student records where a required last name field is blank, so the data is incomplete | |
| 3A presence check makes sure a required field is not left blank | CThree records are missing, so the data is not complete. Complete data needs a record for every student. | |
| 4A required field must always hold a value, so the database should not allow it to be missing | Dif name = "" then print "Name is required" | |
| 5SELECT * FROM students WHERE house = NULL; | ENULL cannot be compared with =, so this query misses the blank values. It should use IS NULL to find the missing houses. | |
| 6Roll has 30 students but the table has 27 rows. Data is complete. | Femail VARCHAR(50) NOT NULL |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
data completeness — Data is complete when every required value is present, with no missing fields or records. A presence check finds blank required fields.SELECT * FROM products
WHERE name IS NULL;CREATE TABLE students (
firstName VARCHAR(30) NOT NULL
);if name = "" then
print "Name is required"
end ifSELECT COUNT(*) FROM students;SELECT * FROM students
WHERE house IS NULL OR lastName IS NULL;