← QCE Digital Solutions Unit 2

Data consistency

The same fact has the same value and format everywhere it is stored, with no spelling variations or conflicting copies. Storing each fact in one place helps keep it consistent.

Understanding Data consistency in QCE Digital Solutions Unit 2

What it does: Ava has two different points totals in two places. Nobody can tell which one is right, so the data is inconsistent. The student's name is stored once and looked up by key, so there are no copies that could disagree. Spelling and capitalisation variations break consistency. A query for house = 'Red' would miss the row that says 'red'. Consistency is about the same fact matching wherever it appears, not about the data type used. One place per fact means you update it once. Several copies can drift apart when only some are changed. All three correct values use the same spelling and capitalisation. The other set is three different ways to write one subject.

Common mistakes: UPDATE does not use FROM. It should be UPDATE students. This statement fixes the spelling variation 'Grean' so every student's house is spelt the same way. The WHERE clause must find the inconsistent value 'tech'. Matching 'Tech' selects rows that are already correct, so the lowercase variation stays. It should be WHERE category = 'tech';.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 144–185) and word search (Modules 144–228).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A student table stores a house as 'Red' in one row and 'red' in another. Is this data consistent?
No, the same fact is written in two different waysYes, a computer treats 'Red' and 'red' as the same
Matches
UPDATE students SET points = 130 WHERE studentId = 1; (the same points total is also kept in another table and not changed)
↓
Only one copy of the fact was updated, so the copies now conflict. Store the fact in one place only.
Applying
Meanings
Term
data consistency
Meaning
The same fact has the same value and format everywhere it is stored, with no spelling variations or conflicting copies. Storing each fact in one place helps keep it consistent.
Practice
SELECT house, COUNT(*) AS total
Testing
Gaps
SELECT house FROM students;
Check Answer
Spots
1UPDATE FROM students
2SET house = 'Green'

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Sea Turtle' badge — Scope Navigator, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A student table stores a house as 'Red' in one row and 'red' in another. Is this data consistent?
A. No, the same fact is written in two different ways ✓
B. Yes, a computer treats 'Red' and 'red' as the same
Spelling and capitalisation variations break consistency. A query for house = 'Red' would miss the row that says 'red'.
2. Which choice best describes data consistency?
A. Every value in a table is a number
B. The same fact has the same value and format everywhere it is stored ✓
Consistency is about the same fact matching wherever it appears, not about the data type used.
3. A school stores Ava's phone number in the students table as 0412 345 678 and in the library table as 0412 999 111. What is the problem?
A. Conflicting copies of the same fact ✓
B. A spelling variation in a column name
Two copies of one fact now disagree, so nobody can tell which phone number is correct. This is a conflicting copy.
4. Which approach helps keep a fact consistent?
A. Store the fact in one place and refer to it from elsewhere ✓
B. Copy the fact into every table that needs it
One place per fact means you update it once. Several copies can drift apart when only some are changed.
5. Which set of values for the Subject column is consistent?
A. Maths, Math, maths
B. Maths, Maths, Maths ✓
All three correct values use the same spelling and capitalisation. The other set is three different ways to write one subject.

Match the Pairs

house = 'Red' in one row, 'red ' in another → A spelling variation: the same fact is stored in two different formats, so the data is inconsistent
students.house, with houses.houseName as the only place a house name is stored → One place per fact: every other table refers to the single stored value, so it cannot conflict
Conflicting copies: the same fact is stored twice with different values → Row 1: Ava, points 120 | Row 7: Ava, points 95
Fixing inconsistency by keeping every fact in one place and linking with a key → SELECT firstName FROM students WHERE studentId = 1;
UPDATE students SET points = 130 WHERE studentId = 1; (the same points total is also kept in another table and not changed) → Only one copy of the fact was updated, so the copies now conflict. Store the fact in one place only.
WHERE house = 'Red' (but some rows hold 'RED' and 'red') → Spelling variations mean the query misses matching rows. Data should be entered in one agreed format, such as 'Red'.

Key Term

data consistency
The same fact has the same value and format everywhere it is stored, with no spelling variations or conflicting copies. Storing each fact in one place helps keep it consistent.

Fill in the Blanks

1. SELECT DISTINCT house FROM students;
Hint: Type the keyword that lists each different value once, so spelling variations stand out.
2. UPDATE students SET house = 'Red' WHERE house = 'red';
Hint: Type the keyword that picks which rows to correct so every copy uses the same spelling.
3. SELECT firstName, quantity FROM orders JOIN students ON orders.studentId = students.studentId;
Hint: Type the keyword that pulls a fact from the one table where it is stored, instead of keeping a copy.
4. UPDATE products SET price = 4.5 WHERE name = 'Notebook';
Hint: Type the table name that stores the price in one place, so only one change is needed.
5. house TEXT CHECK (house IN ('Red','Blue'))
Hint: Type the constraint keyword that only allows listed values so the format stays consistent.

Spot the Error

Question 1
A UPDATE FROM students
B SET house = 'Green'
C WHERE house = 'Grean';
Line A — UPDATE does not use FROM. It should be UPDATE students. This statement fixes the spelling variation 'Grean' so every student's house is spelt the same way.
Question 2
A UPDATE products
B SET category = 'Tech'
C WHERE category = 'Tech';
Line C — The WHERE clause must find the inconsistent value 'tech'. Matching 'Tech' selects rows that are already correct, so the lowercase variation stays. It should be WHERE category = 'tech';
Question 3
A SELECT s.firstName, r.mark
B FROM students s
C JOIN results
D ON s.studentId = r.studentId;
Line C — The alias r is missing, so r.mark and r.studentId are not recognised. It should be JOIN results r. The name is stored once in students and results only holds the studentId.
Question 4
A input house
B house = upper(house)
C if house = "RED" then
D print "Red house"
E end if
Line B — Assignment in pseudocode uses <-, not =. It should be house <- upper(house). This puts every entry in one format, such as RED, so spelling variations like red or Red cannot appear.
Question 5
A input suburb
B suburb <- trim(suburb)
C suburb <- upper(suburb)
D save suburb to both tables
Line D — Saving the suburb into two tables creates copies that can end up with different values. It should be saved in one place only: save suburb to customers.

Student with a class code? Join your class →