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 | |
|---|---|---|
| 1name TEXT NOT NULL | AThe words are in the wrong order. NOT NULL is the keyword pair and it should be written as name TEXT NOT NULL. | |
| 2CHECK (age BETWEEN 0 AND 120) | Bemail TEXT UNIQUE | |
| 3A constraint that stops two students being saved with the same email address | CThe condition is missing its brackets. It should be CHECK (age BETWEEN 0 AND 120). | |
| 4A constraint that only allows a mark between 0 and 100 | DA range check: the database rejects any record where age is below 0 or above 120. | |
| 5name TEXT NULL NOT | EA presence check: the database will not accept a record if the name field is left empty. | |
| 6CHECK age BETWEEN 0 AND 120 | FCHECK (mark BETWEEN 0 AND 100) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CHECK (age BETWEEN 0 AND 120) — A constraint is a rule on a column. This CHECK rejects any record with an age outside 0 to 120. NOT NULL (must have a value) and UNIQUE (no repeats) are constraints too.name TEXT NOT NULL,email TEXT UNIQUE,age INTEGER CHECK (age BETWEEN 0 AND 120)age INTEGER CHECK (age BETWEEN 0 AND 120)CREATE TABLE pupil (
age INTEGER CHECK (age BETWEEN 0 AND 120)
);