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 | |
|---|---|---|
| 1firstName VARCHAR(30) | AThe postcode field is set to a size of exactly 4 characters | |
| 2postcode CHAR(4) | ByearLevel TINYINT | |
| 3A field size sets the maximum length of text a value may use, so a short code only needs a small size | CA size of 10 is too small for most email addresses, so many values would be rejected or cut off. | |
| 4A smaller field size saves storage, so a field holding a small whole number can use a small number type | DstateCode VARCHAR(3) | |
| 5INSERT INTO students (house) VALUES ('Burgundy Dragons'); -- house VARCHAR(5) | EThe firstName field can store text up to a maximum of 30 characters | |
| 6email VARCHAR(10) | FThe value has 16 characters but the field size only allows 5, so it will be rejected or cut off. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
VARCHAR(30) — Field size sets the maximum length or storage a value may use. VARCHAR(30) allows up to 30 characters; longer values are rejected or cut. Smaller sizes save storage.-- Text of varying length, max 30
firstName VARCHAR(30)-- Names may be up to 30 characters
firstName VARCHAR(30)-- State code, always 3 characters
state CHAR(3)-- Australian postcodes have 4 digits
postcode CHAR(4)-- 6 digits in total, 2 after the point
price DECIMAL(6,2)