Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Problems caused by inconsistent data formats when inserting data worksheet is part of the QCE Digital Solutions Unit 2 — Data-Driven Problems and Solution Requirements 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 | |
|---|---|---|
| 1INSERT INTO orders VALUES (11, 1, 2, 3, '03/02/2026'); | AThe date is written in a different style from the YYYY-MM-DD format used by the table, so it is inconsistent and must be converted. | |
| 2INSERT INTO products VALUES (11, 'Ruler', 'Stationery', '$2.50', 10); | BThe yearLevel is written as the word 'Seven' (text) instead of the number 7, so it is the wrong format for a numeric field. | |
| 3Two files use different delimiters, so one must be split differently before its fields can be inserted into the same table | CNguyen,Ava,7 must become Ava,Nguyen,7 | |
| 4Sources can list fields in a different order, so values must be reordered to match the table before insertion | DAva|Nguyen|7 versus Ava,Nguyen,7 | |
| 5INSERT INTO students VALUES (11, 'Kai', 'Lee', 'Seven', 'Red', 60); | EFails to match the stored dates because it uses DD/MM/YYYY instead of the YYYY-MM-DD format the orderDate column uses | |
| 6INSERT INTO orders VALUES (11, 2, 3, 1, 'Feb 5 2026'); | FInserts a price as text with a dollar sign instead of a plain number, so the price column holds inconsistent data |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
inconsistent data format — Data from different sources written in different ways (dates, text vs numbers, delimiters). It must be converted to one consistent format before it can be inserted into a data store.markNum ← toInteger(markText)
insert markNum into resultsfields ← split(line, ";")fields ← split(line, ";")
// File B order: mark;name. Index from 1
name ← fields[2]parts ← split(date, "/") // DD/MM/YYYY
iso ← parts[3]+"-"+parts[2]+"-"+parts[1]if format ≠ "YYYY-MM-DD" then
date ← convertDate(raw)
end if