Data completeness

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Data completeness

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student record arrives with the email field left blank, but email is a required field. Is the data complete?
A No, a required value is missing
B Yes, the rest of the record is present
2. A file of 500 orders is sent, but only 480 records arrive. Which data quality issue is this?
A Incorrect values, so the data is inaccurate
B Missing records, so the data is incomplete
3. Which statement best describes complete data?
A Every required value is present, with no blank fields or missing records
B Every value that is present is the right value
4. An exchange marks the field 'dateOfBirth' as required. A record arrives with dateOfBirth empty. What should the receiving system do?
A Flag the record as incomplete and request the missing value
B Accept it, because the other fields are filled in
5. A customer record has no value in the optional 'middleName' field. Is the record incomplete?
A Yes, any blank field makes data incomplete
B No, optional fields can be blank

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1=COUNTBLANK(B2:B9) ACompleteness also needs every record to be present. Two records are missing, so the data is incomplete even if the 98 records have no blank fields.
2if len(records) < expected: BChecks whether fewer records arrived than were expected, which means some records are missing and the data is incomplete
3A required field must not be left blank, so a record with an empty email is incomplete Cif received == sent: print("All records arrived")
4Completeness also means no records are missing, so the count received must match the count sent DThe condition is reversed. It reports a missing name when the name is present. It should test name == "" to find a blank required field.
5if name != "": print("Name is missing") Eif email == "": print("Incomplete record")
6A file with 98 of 100 records is complete because every record that arrived has all its fields filled in FCounts the blank cells in a column so you can see how many values are missing and whether the data is complete

Definitions

completeness

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
SELECT * FROM students WHERE house IS ____;
2.
=__________(B2:B9)
3.
required = ["id", "name", "email"] complete = ___(f in row for f in required)
4.
if len(rows) _ expected_rows: print("Missing records")
5.
if email __ "": print("Blank field")

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A required = ["name", "email"]
B record = {"name": "Ava"}
C missing = []
D for f in record:
E if f not in record:
F missing.append(f)
Question 2
A expected == 10
B received = len(rows)
C if received < expected:
D print("Missing records")
Question 3
A row = ["Ava", "", "Year 12"]
B blanks = 0
C for value in row:
D if value == " ":
E blanks += 1
Question 4
A rows = [["Ava", 7], ["Liam", ""]]
B complete = 0
C for r in rows
D if "" not in r:
E complete += 1
Question 5
A required = ["id", "name" "mark"]
B data = {"id": 1, "name": "Zoe"}
C for f in required:
D if f not in data:
E print(f, "is missing")

Answer Key

Data completeness
Section A: Quick Questions
Q1
A — No, a required value is missing
Q2
B — Missing records, so the data is incomplete
Q3
A — Every required value is present, with no blank fields or missing records
Q4
A — Flag the record as incomplete and request the missing value
Q5
B — No, optional fields can be blank
Section B: Match the Pairs
Q1
=COUNTBLANK(B2:B9) → Counts the blank cells in a column so you can see how many values are missing and whether the data is complete
Q2
if len(records) < expected: → Checks whether fewer records arrived than were expected, which means some records are missing and the data is incomplete
Q3
A required field must not be left blank, so a record with an empty email is incomplete → if email == "": print("Incomplete record")
Q4
Completeness also means no records are missing, so the count received must match the count sent → if received == sent: print("All records arrived")
Q5
if name != "": print("Name is missing") → The condition is reversed. It reports a missing name when the name is present. It should test name == "" to find a blank required field.
Q6
A file with 98 of 100 records is complete because every record that arrived has all its fields filled in → Completeness also needs every record to be present. Two records are missing, so the data is incomplete even if the 98 records have no blank fields.
Section C: Definitions
Q1
completeness — Data is complete when every required value is present. There are no blank fields and no missing records, so everything the exchange needs has arrived.
Section D: Fill in the Blanks
Q1
SELECT * FROM students WHERE house IS NULL;
Q2
=COUNTBLANK(B2:B9)
Q3
required = ["id", "name", "email"] complete = all(f in row for f in required)
Q4
if len(rows) < expected_rows: print("Missing records")
Q5
if email == "": print("Blank field")
Section E: Spot the Error
Q1
D — The loop must go through the required fields. Looping over the record only checks fields that are already there, so missing ones are never found. It should be: for f in required:
Q2
A — A single = assigns the number of expected records to the variable. == is a comparison and would cause a NameError because expected does not exist yet. It should be: expected = 10
Q3
D — A blank field is an empty string, "", with nothing inside the quotes. " " contains a space, so truly blank fields would be missed. It should be: if value == "":
Q4
C — A for statement must end with a colon. Without it Python raises a SyntaxError and the completeness check cannot run. It should be: for r in rows:
Q5
A — The comma between "name" and "mark" is missing. Python joins them into "namemark", so the list has only two required fields and the mark field is never checked. It should be: required = ["id", "name", "mark"]