Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This First normal form (1NF) (Data and Programming Techniques) worksheet is part of the QCE Digital Solutions Unit 2 — Data and Programming Techniques journey. Print it as a booklet?
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 | |
|---|---|---|
| 1Hobbies = 'Chess, Soccer, Art' | AThe items field holds several values in one cell, so it is not atomic. Each item should have its own row. | |
| 2Phone1, Phone2, Phone3 | BA multi-value cell that breaks 1NF because one field holds several values instead of one atomic value | |
| 3To fix a multi-value cell, split it so each value gets its own row and the table has a primary key | CStudentHobby(studentId, hobby) (1, 'Chess') (1, 'Soccer') (1, 'Art') | |
| 4To remove repeating columns, move them into a separate table with one row per value, linked by a key | DSubject1, Subject2 and Subject3 are repeating columns, so the table is not in 1NF. Use a separate table with one row per subject. | |
| 5Student(studentId, name, Subject1, Subject2, Subject3) | ERepeating columns (a repeating group) that break 1NF and should be moved to their own rows | |
| 6Order(orderId, items) (1, 'Pen, Ruler, Book') | FStudentPhone(studentId, phone) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
First normal form (1NF) — A table is in 1NF when every field holds one atomic value, there are no repeating groups or repeating columns, and each row is identified by a key.CREATE TABLE student (
studentId INT PRIMARY KEY,
name VARCHAR(30));INSERT INTO enrolment VALUES (1, 'Maths');
INSERT INTO enrolment VALUES (1, 'Art');ALTER TABLE student
DROP COLUMN phone2;SELECT subject FROM enrolment
WHERE studentId = 1;CREATE TABLE phone (
studentId INT, number VARCHAR(10),
PRIMARY KEY (studentId, number));