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 | |
|---|---|---|
| 1phone = '0412 345 678, 0498 765 432' | ARepeating columns: the same kind of data is spread across numbered columns, a repeating group that breaks 1NF | |
| 2subject1, subject2, subject3 | BCREATE TABLE students (studentId INTEGER PRIMARY KEY, firstName TEXT); | |
| 3To meet 1NF, every row must be identified by a primary key | CThe table has repeating columns and no primary key. Move the items into rows with one item each, and add a primary key such as orderId. | |
| 4A 1NF fix for a multi-valued field: store one value per row, not a list in one field | DThe subjects field holds a list of values. It is not atomic, so the table is not in 1NF. Give each subject its own row. | |
| 5Students(studentId, name, subjects) where subjects = 'Maths, English, Art' | EA multi-valued field: two values are stored in one field, so the table breaks 1NF | |
| 6Orders(item1, item2, item3, qty1, qty2, qty3) with no primary key | FINSERT INTO studentPhones VALUES (1, '0412 345 678'), (1, '0498 765 432'); |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
1NF — First normal form: every field holds one atomic value, with no repeating groups or multi-valued fields, and the table has a primary key to identify each row.CREATE TABLE Student (
studentId INT PRIMARY KEY,
firstName VARCHAR(30));-- 1NF: one subject per row, not a list
INSERT INTO Enrolment VALUES (1, 'Maths');CREATE TABLE Phone (
phoneId INT PRIMARY KEY,
phone VARCHAR(15));SELECT * FROM Student
WHERE subjects LIKE '%,%';CREATE TABLE Enrolment (
studentId INT, subjectId INT,
PRIMARY KEY (studentId, subjectId));