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 | |
|---|---|---|
| 1student_id | AA descriptive column name that says what data it holds, in the same lowercase underscore style | |
| 2first_name | BA key column name: lowercase, descriptive, and ending in the _id suffix | |
| 3A primary key in the Student table is named with the _id suffix | CThe foreign key name does not match the primary key name. It should be student_id. | |
| 4A foreign key in the Enrolment table reuses the primary key name from the Student table | DThe column names use mixed styles. They should all be lowercase with underscores: first_name, last_name, year_level. | |
| 5Enrolment table: StudentRef (foreign key to Student.student_id) | ECREATE TABLE Student (student_id INTEGER PRIMARY KEY); | |
| 6Student table columns: student_id, FirstName, last name, Year-Level | Fstudent_id INTEGER REFERENCES Student(student_id) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
student_id — A key column name in lowercase with an _id suffix. A primary key uses it in its own table, and a foreign key reuses the exact same name in a related table.CREATE TABLE student (
student_id INTEGER PRIMARY KEY,
first_name TEXT);CREATE TABLE result (
mark INTEGER,
student_id INTEGER);CREATE TABLE class (
class_id INTEGER PRIMARY KEY,
class_name TEXT);CREATE TABLE student (
last_name TEXT,
first_name TEXT);ALTER TABLE mark
ADD FOREIGN KEY (subject_id)
REFERENCES subject(subject_id);