Problems caused by inconsistent data formats when inserting data
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.
Understanding Problems caused by inconsistent data formats when inserting data in QCE Digital Solutions Unit 2
What it does: One source separates fields with a pipe and the other with a comma. Each must be split using its own delimiter so the same fields line up before they are inserted. Dates written in different ways can be rejected or misread. Convert them to one format, such as YYYY-MM-DD, before inserting. A number field needs a real numeric value. The text must be converted first or the insert may fail. The delimiter tells the program where one field ends. Using the wrong one breaks the data apart in the wrong places. Converting before insertion stops bad or mismatched data entering the store and keeps it reliable.
Common mistakes: A CSV row uses commas as its delimiter. Splitting on ';' leaves the whole row in one piece, so the fields cannot be inserted. It should be split(csvRow, ','). The source date is DD/MM/YYYY, so p[0] is the day and p[2] is the year. The line keeps the day-first order, so the store gets an inconsistent date. It should build year-month-day: p[2]+'-'+p[1]+'-'+p[0].
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 2–115) and word search (Modules 2–139).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
inconsistent data formatFill in the Blanks
Spot the Error
Student with a class code? Join your class →