← QCE Digital Solutions Unit 2

Data quality: completeness

Data quality where every record has a value in each required field and no needed records are missing. In SQL, a missing value shows as NULL.

Understanding Data quality: completeness in QCE Digital Solutions Unit 2

What it does: NOT NULL forces a value in the field, which protects completeness when records are entered. A LEFT JOIN keeps every student, and r.studentId IS NULL shows students who have no results, so needed records are missing. Spelling and type are about accuracy and validity. Completeness is about missing values and missing records. NULL means missing or unknown. It is not the same as 0 or an empty text string. NULL is not a value, so you must test it with IS NULL. Comparing with = NULL never matches any rows. NOT NULL rejects any insert that leaves the field empty. UNIQUE only stops duplicates.

Common mistakes: NULL means a value is missing, and = can never match it. Use IS NULL to find students with no house: WHERE house IS NULL. COUNT(house) skips NULL values, so it would count 0 missing houses. COUNT(*) counts every row that the WHERE clause finds.

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 337–409) and word search (Modules 234–409).

Take this worksheet further — free with Cloodit

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

Learning
Duo
A students table has a row where lastName is empty (NULL) but lastName is a required field. Which data quality problem is this?
Inaccurate data: the value is wrongIncomplete data: a required value is missing
Matches
SELECT * FROM students WHERE house = NULL;
↓
NULL cannot be tested with =, so this returns no rows and the missing values are not found. It should be WHERE house IS NULL.
Applying
Meanings
Term
completeness
Meaning
Data quality where every record has a value in each required field and no needed records are missing. In SQL, a missing value shows as NULL.
Practice
INSERT INTO students (studentId, firstName, lastName, yearLevel) VALUES (11, 'Kai', 'Brown', 9);
Testing
Gaps
WHERE house IS ;
Check Answer
Spots
1SELECT * FROM students
2WHERE house = NULL

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

The 'Desert Tortoise' badge — Desert Master, 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 students table has a row where lastName is empty (NULL) but lastName is a required field. Which data quality problem is this?
A. Incomplete data: a required value is missing ✓
B. Inaccurate data: the value is wrong
Completeness means every record has a value in each required field. A NULL in a required field breaks this.
2. Which statement describes complete data?
A. Every record has a value in each required field and no needed records are missing ✓
B. Every value is spelled correctly and uses the right data type
Spelling and type are about accuracy and validity. Completeness is about missing values and missing records.
3. A school has 10 students but the students table only holds 8 rows. What is wrong?
A. Missing values in a field, so the data is inaccurate
B. Missing records, so the data is incomplete ✓
Completeness covers whole records that are missing as well as blank fields inside a record.
4. What does NULL mean in an SQL table?
A. No value has been stored in that field ✓
B. The number zero has been stored in that field
NULL means missing or unknown. It is not the same as 0 or an empty text string.
5. Which query finds rows with a missing mark in the results table?
A. SELECT * FROM results WHERE mark = NULL;
B. SELECT * FROM results WHERE mark IS NULL; ✓
NULL is not a value, so you must test it with IS NULL. Comparing with = NULL never matches any rows.

Match the Pairs

WHERE email IS NULL → Finds records where the email value is missing, so the data is incomplete for that field
SELECT COUNT(*) - COUNT(phone) FROM students; → Counts how many records have no phone value, because COUNT(phone) skips NULLs
A required field must not be left empty, so the table stops a record being saved without it → lastName VARCHAR(30) NOT NULL
Missing records are found by looking for a parent record with no matching rows in the related table → SELECT s.firstName FROM students s LEFT JOIN results r ON s.studentId = r.studentId WHERE r.studentId IS NULL;
SELECT * FROM students WHERE house = NULL; → NULL cannot be tested with =, so this returns no rows and the missing values are not found. It should be WHERE house IS NULL.
INSERT INTO students (studentId, firstName) VALUES (11, 'Kai'); → The record is incomplete because required fields like lastName and yearLevel are not given a value, so they are NULL. Every required field needs a value.

Key Term

completeness
Data quality where every record has a value in each required field and no needed records are missing. In SQL, a missing value shows as NULL.

Fill in the Blanks

1. SELECT * FROM students WHERE house IS NULL;
Hint: Type the keyword that stands for a missing value in a field.
2. SELECT * FROM products WHERE stock IS NULL;
Hint: Type the keyword used to test for a missing value. The = operator does not work here.
3. SELECT firstName FROM students WHERE points IS NOT NULL;
Hint: Type the keyword that keeps only records which have a value in the field.
4. SELECT firstName FROM students WHERE studentId NOT IN (SELECT studentId FROM results);
Hint: Type the operator that finds students whose ID is absent from the results table, meaning their records are missing.
5. CREATE TABLE club ( name VARCHAR(30) NOT NULL );
Hint: Type the constraint that stops a record being saved without a value in this field.

Spot the Error

Question 1
A SELECT * FROM students
B WHERE house = NULL
C ORDER BY lastName;
Line B — NULL means a value is missing, and = can never match it. Use IS NULL to find students with no house: WHERE house IS NULL.
Question 2
A SELECT COUNT(house) AS missing
B FROM students
C WHERE house IS NULL;
Line A — COUNT(house) skips NULL values, so it would count 0 missing houses. COUNT(*) counts every row that the WHERE clause finds.
Question 3
A CREATE TABLE contacts (
B id INTEGER PRIMARY KEY,
C name TEXT,
D email TEXT NULL
E );
Line D — NULL allows the email to be left empty, which makes the data incomplete. A required field should be declared NOT NULL.
Question 4
A UPDATE students
B SET house = 'Red'
C WHERE house IS NOT NULL
D AND studentId = 4;
Line C — Filling in a missing value must target rows where the house is NULL. IS NOT NULL would overwrite houses that already exist.
Question 5
A if name != '':
B print('Name missing')
C else:
D print('Saved')
Line A — The completeness check must catch an empty name. != '' is true when a name was typed, so the check is back to front. It should be name == ''.

Student with a class code? Join your class →