← QCE Digital Solutions Unit 2

Data completeness

Data is complete when every required value is present, with no missing fields or records. A presence check finds blank required fields.

Understanding Data completeness in QCE Digital Solutions Unit 2

What it does: The code tests whether the required field is empty and warns the user, which is a presence check. NOT NULL makes the email a required field, so a record cannot be saved without it and the data stays complete. Required fields hold values every record must have. A middle name is optional, so it should not be required. The sensor readings for those hours are not in the dataset. This is a missing records problem, so the data is incomplete. A presence check only confirms that something is there. A person could type the wrong value and still pass it.

Common mistakes: A presence check finds a blank required field, so the message must tell the user the email is missing. It should print "Email is required". A missing value is tested with IS NULL, not = NULL. Comparing with = NULL never matches, so no blank last names are found.

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 record has a blank value in the required field 'email'. Is this data complete?
Yes, the rest of the record is filled inNo, a required value is missing
Matches
SELECT * FROM students WHERE house = NULL;
↓
NULL cannot be compared with =, so this query misses the blank values. It should use IS NULL to find the missing houses.
Applying
Meanings
Term
data completeness
Meaning
Data is complete when every required value is present, with no missing fields or records. A presence check finds blank required fields.
Practice
input name
Testing
Gaps
WHERE name IS ;
Check Answer
Spots
2if email = "" then
3 print "Email accepted"

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

The 'Ostrich' badge — Full Sprint, 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 record has a blank value in the required field 'email'. Is this data complete?
A. No, a required value is missing ✓
B. Yes, the rest of the record is filled in
Data is complete only when every required value is present. One blank required field makes the record incomplete.
2. Which check finds blank required fields when data is entered?
A. Range check
B. Presence check ✓
A presence check confirms that a required field has been filled in. A range check tests whether a number falls between limits.
3. A school has 30 students in Year 11, but the students table holds only 27 rows. What is the completeness problem?
A. Missing records ✓
B. Missing data types
Complete data also needs every record that should exist. Three students are absent, so three records are missing.
4. Which field is the best choice to mark as a required field in a students table?
A. middleName, because some students have one
B. studentId, because every student must have one ✓
Required fields hold values every record must have. A middle name is optional, so it should not be required.
5. A sensor logs the temperature every hour but nothing was saved between 2pm and 5pm. What is missing?
A. Records for those hours ✓
B. Field names in the header
The sensor readings for those hours are not in the dataset. This is a missing records problem, so the data is incomplete.

Match the Pairs

SELECT * FROM students WHERE lastName IS NULL; → Finds student records where a required last name field is blank, so the data is incomplete
SELECT COUNT(*) FROM students; → Counts the records in the table so you can compare with how many records should be there
A presence check makes sure a required field is not left blank → if name = "" then print "Name is required"
A required field must always hold a value, so the database should not allow it to be missing → email VARCHAR(50) NOT NULL
SELECT * FROM students WHERE house = NULL; → NULL cannot be compared with =, so this query misses the blank values. It should use IS NULL to find the missing houses.
Roll has 30 students but the table has 27 rows. Data is complete. → Three records are missing, so the data is not complete. Complete data needs a record for every student.

Key Term

data completeness
Data is complete when every required value is present, with no missing fields or records. A presence check finds blank required fields.

Fill in the Blanks

1. SELECT * FROM products WHERE name IS NULL;
Hint: Type the keyword that stands for a missing value, used to find blank fields.
2. CREATE TABLE students ( firstName VARCHAR(30) NOT NULL );
Hint: Type the constraint that makes this a required field that cannot be left blank.
3. if name = "" then print "Name is required" end if
Hint: Type the comparison operator that checks whether the name is empty (a presence check).
4. SELECT COUNT(*) FROM students;
Hint: Type the aggregate function that counts records, to spot missing records against the expected total.
5. SELECT * FROM students WHERE house IS NULL OR lastName IS NULL;
Hint: Type the Boolean operator that finds rows with either required field missing.

Spot the Error

Question 1
A input email
B if email = "" then
C print "Email accepted"
D end if
Line C — A presence check finds a blank required field, so the message must tell the user the email is missing. It should print "Email is required".
Question 2
A SELECT studentId, lastName
B FROM students
C WHERE lastName = NULL;
Line C — A missing value is tested with IS NULL, not = NULL. Comparing with = NULL never matches, so no blank last names are found.
Question 3
A missing <- 0
B for i from 2 to length(phone)
C if phone[i] = "" then
D missing <- missing + 1
E end if
F end for
Line B — The loop starts at 2, so it skips the first record and its blank phone number is never counted. It should start at 1 so every record is checked.
Question 4
A name = input("Name: ")
B while name == "":
C print("Name is required")
D input("Name: ")
Line D — The new input is not stored in name, so it stays blank and the loop never ends. It should be name = input("Name: ").
Question 5
A CREATE TABLE members (
B email VARCHAR(50) NULL,
C name VARCHAR(30) NOT NULL
D );
Line B — NULL allows the required email field to be left blank. A required field should be declared NOT NULL so the data stays complete.

Student with a class code? Join your class →