Data integrity: correctness

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

Data integrity: correctness

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student types the value 'Mia' into the Age field of a database. Which integrity feature does this break?
A Correctness: the value is in the right field
B Correctness: the value is in the wrong field
2. Which entry is in the right form for a field that stores Quantity as a whole number?
A twelve
B 12
3. A spreadsheet total uses =SUM(B2:B8) but the data runs from B2 to B9. What is the result?
A Processing is incorrect, as the total leaves out a row
B Processing is correct, as the formula has no error message
4. Which method best checks that a calculation is correct?
A Work out the expected result by hand and compare it with the output
B Check that the formula returns some number
5. A shop records a pencil price as $1.50, but the real price is $1.80. The value is in the right field and form. Which feature is the issue?
A Accuracy: it is not close to the real-world value
B Correctness: it is in the wrong field

Match the Pairs

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

Left columnRight column
1Phone number typed into the Email field AThis is an accuracy error: the value does not match the real world. It is not a field or form error, so the fix is to enter 72.
2=SUM(B2:B9) used where AVERAGE was needed BAge (integer): 16
3Correct data is in the right form, so an age is stored as a number, not text CThe value is in the wrong field, so it is incorrect. Move 95 to the Mark field.
4Checking a calculation by working out a few results by hand to confirm the right result DCheck: 88 + 74 + 81 = 243, and the sheet shows 243
5Mark: 95 stored in the Student Name field EA correctness error: the value is in the wrong field
6A student scored 72 but 27 was typed. The data is called incorrect because it is not correct. FA correctness error: processing gives the wrong result

Definitions

correctness

Fill in the Blanks

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

1.
SELECT _________ FROM students WHERE studentId = 1;
2.
DECLARE yearLevel AS _______
3.
=_______(B2:D2) // mean of Ava's three marks
4.
=C2_D2 // total stock value of the pencils
5.
height ← 172 // real height is 175 cm // Correct form, but not ________

Spot the Error

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

Question 1
A lastName ← 'Ava'
B yearLevel ← 7
C OUTPUT firstName, yearLevel
Question 2
A price ← 4.50
B qty ← '3'
C total ← price * qty
D OUTPUT total
Question 3
A total ← 88 + 74 + 81
B average ← total / 2
C OUTPUT average
Question 4
A mark1 ← 88
B mark2 ← 74
C mark3 ← 81
D total ← mark1 + mark2 + mark2
E OUTPUT total
Question 5
A SELECT firstName, house
B FROM students
C WHERE house > 100;

Answer Key

Data integrity: correctness
Section A: Quick Questions
Q1
B — Correctness: the value is in the wrong field
Q2
B — 12
Q3
A — Processing is incorrect, as the total leaves out a row
Q4
A — Work out the expected result by hand and compare it with the output
Q5
A — Accuracy: it is not close to the real-world value
Section B: Match the Pairs
Q1
Phone number typed into the Email field → A correctness error: the value is in the wrong field
Q2
=SUM(B2:B9) used where AVERAGE was needed → A correctness error: processing gives the wrong result
Q3
Correct data is in the right form, so an age is stored as a number, not text → Age (integer): 16
Q4
Checking a calculation by working out a few results by hand to confirm the right result → Check: 88 + 74 + 81 = 243, and the sheet shows 243
Q5
Mark: 95 stored in the Student Name field → The value is in the wrong field, so it is incorrect. Move 95 to the Mark field.
Q6
A student scored 72 but 27 was typed. The data is called incorrect because it is not correct. → This is an accuracy error: the value does not match the real world. It is not a field or form error, so the fix is to enter 72.
Section C: Definitions
Q1
correctness — Each value is entered in the right field and right form, and processing gives the right result. It differs from accuracy, which is how close a value is to the real world.
Section D: Fill in the Blanks
Q1
SELECT firstName FROM students WHERE studentId = 1;
Q2
DECLARE yearLevel AS INTEGER
Q3
=AVERAGE(B2:D2) // mean of Ava's three marks
Q4
=C2*D2 // total stock value of the pencils
Q5
height ← 172 // real height is 175 cm // Correct form, but not accurate
Section E: Spot the Error
Q1
A — Ava is a first name, but it was entered in the lastName field, so firstName is never set and the output is wrong. It should be firstName ← 'Ava'.
Q2
B — Quantity was entered as text instead of a number, so price * qty cannot give a correct result. It should be qty ← 3.
Q3
B — There are three marks, so the total must be divided by 3. Dividing by 2 gives an incorrect average, and checking the calculation by hand would show this.
Q4
D — The calculation adds mark2 twice and leaves out mark3, so the processing gives the wrong total. It should be total ← mark1 + mark2 + mark3.
Q5
C — house holds text such as 'Red', so it is the wrong field to compare with the number 100. The condition should use the points field.