Skip to content
Cambridge AS & A Level9618

Data Integrity

Computer Science 9618 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Data Integrity notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Data Integrity notes as text: skim, search, and jump between subtopics.

~15 min read

1. Integrity, validation and verification

Data integrity means the data is consistent and up to date. Mark schemes also accept accuracy and completeness, but integrity does not by itself make data correct. Validation and verification both help to protect it.

Validation checks that data is reasonable / sensible and within set bounds. Verification checks that data is the same as the original.

Neither is a guarantee. Validation does not check that accurate data has been entered. Verification does not check that the original data is accurate.

Examiner insight

“Some candidates gave methods of ensuring the integrity of the data rather than stating what was meant by integrity of data.” “There were many incorrect statements such as “data integrity makes sure that the data is correct”. Data integrity makes sure that the data is consistent and up to date, but it does not ensure accuracy or correctness.”

Worked example 14 marks

Xanthe uses both data validation and data verification when entering data on her computer.

(i) Describe how data validation helps to protect the integrity of the data. Give an example in your answer.

(ii) Describe how data verification helps to protect the integrity of the data. Give an example in your answer.

  1. 1

    (i) Validation checks that data is reasonable / sensible. [1]

  2. 2

    Example: checking the data is the right number or type of characters. [1]

  3. 3

    (ii) Verification checks that data is the same as the original. [1]

  4. 4

    Example: double entry. [1]

2. Range, limit, format and length checks

A range check keeps data between two values, so it includes both ends. A limit check has only one end: the data must be after, or before, one set value.

A format check makes sure the data has the correct combination of letters, numbers and symbols, such as dd/mm/yyyy. A length check makes sure the correct quantity of characters has been entered: exactly 10, or more than 1 and at most 100.

Name the check, then say how it applies to the data in the question.

Examiner insight

“Some candidates need to ensure that their descriptions of a validation check do more than just repeat the name of the check.” “The command word was 'describe', so it was insufficient to simply list the names of two validation checks.”

Worked example 13 marks

The personal data includes the date of birth, for example 05/07/2010.

Complete the table by identifying two methods of validation that can be used on the date of birth. State how each validation method will be used for the date of birth.

  1. 1

    Two correct names, for example range check and format check. [1]

  2. 2

    Range check: the date of birth must be after one date and before another date, including both ends. [1]

  3. 3

    Format check: the date of birth must be dd/mm/yyyy. [1]

3. Presence, existence and check digit

A presence check makes sure the data has been entered: the field cannot be left blank. An existence check compares the data entered to a list of possible values and rejects anything that is not on it.

A check digit is a digit added to the end of a number. The simple method adds all the digits and uses the remainder when the sum is divided by 10. For 4162 the sum is 13, so the check digit is 3 and the new number is 41623.

The check digit is worked out again when the number is entered and must match. It detects a single-digit error, but a wrong number with the same digit sum is accepted.

check digit = sum of the digits bmod 10

Examiner insight

“Many candidates found it challenging to identity this validation check. A common incorrect answer was a type check.” “A common incorrect response was an explanation of the code rather than the naming of a validation check.”

Worked example 13 marks

Each of the following algorithms performs data validation.

State the type of validation check that each of the algorithms performs.

(a)

``` INPUT x IF x < 0 OR x > 10 THEN OUTPUT "Invalid" ENDIF ```

(b)

``` INPUT x IF x = "" THEN OUTPUT "Invalid" ENDIF ```

(c)

``` INPUT x IF NOT(x = "Red" OR x = "Yellow" OR x = "Blue") THEN OUTPUT "Invalid" ENDIF ```

  1. 1

    (a) Range check: x outside 0 to 10 is rejected. [1]

  2. 2

    (b) Presence check: an empty input is rejected. [1]

  3. 3

    (c) Existence check: x must be one of the listed values. [1]

4. Verification during data entry

Two methods verify data as it is typed in.

In a visual check, a person compares the entered data with the original document. In double entry, the data is entered twice and the computer automatically compares the two entries.

Both show that the data matches what was given. Neither shows that the original is correct.

Examiner insight

“There was also some confusion between verification and validation. Some candidates need to improve their understanding of the difference between the two.” “Some candidates found it challenging to differentiate between double entry and a visual check and their descriptions could have applied equally to both.”

Worked example 14 marks

An example of a tutor ID is NK16C6.

An administrative officer enters the tutor ID into the TUTOR table.

Explain how data verification can be used when the tutor ID is entered.

  1. 1

    The administrator completes a visual check, checking by eye [1]

  2. 2

    that the tutor ID input matches the tutor ID on the original document. [1]

  3. 3

    Double entry: the administrator (or a second person) enters the number a second time [1]

  4. 4

    and the system compares it with the first entry. [1]

5. Parity byte and parity block checks

Parity checks verify data during transfer. The sender and receiver agree on odd or even parity. Each byte holds 7 data bits and a parity bit. The sender counts the 1s in the 7 bits and sets the parity bit so the byte matches the agreed parity.

With even parity, a byte received with an odd number of 1s has an error.

A parity block check groups the bytes in a grid. A bit for each column makes the column match the parity, and these bits are sent as a parity byte. Parity is checked along the rows and down the columns, so the position of the incorrect bit can be found.

Worked example 14 marks

The data from the robots is transmitted to a central computer using a wireless connection.

Complete the table by identifying and describing two methods of data verification that can be used during data transfer.

  1. 1

    Method 1: parity byte. [1]

  2. 2

    An additional bit is added to make the number of 1s in the byte odd or even to match the parity. If a byte with an odd number of 1 bits is received when even parity is used, there is an error. [1]

  3. 3

    Method 2: parity block. [1]

  4. 4

    Parity is calculated horizontally and vertically, and a parity byte is sent with the data. The parity is re-checked when received and the position of an incorrect bit can be determined. [1]

6. Checksum

A checksum is a value calculated from the data by an algorithm. It is transmitted with the data.

The receiver repeats the calculation on the data received and compares the result with the checksum that arrived. If the two values are different, there is an error. If they match, the data is verified.

Examiner insight

“There was some confusion with check digits and parity blocks.” “The question asked for a description, so responses needed to include more than just a statement about adding the data values together.”

Worked example 13 marks

A checksum can be used to detect errors during data transmission.

Describe how a checksum is used.

  1. 1

    The checksum value is calculated from the data before transmission. [1]

  2. 2

    This value is transmitted with the data. [1]

  3. 3

    The receiving computer recalculates the checksum from the received data. If it does not match the one received, an error has occurred. [1]

Recap

  • Integrity: data that is consistent and up to date. It does not by itself make data correct.
  • Validation: data is reasonable / sensible. Verification: data is the same as the original.
  • Range: between two values, both ends. Limit: one end only. Format: the pattern. Length: the number of characters.
  • Presence: not left blank. Existence: on a list of possible values.
  • Check digit: worked out from the other digits and appended. Same digit sum, same check digit.
  • Data entry: visual check, double entry. Data transfer: parity byte, parity block, checksum.
  • Parity: agree odd or even, set the parity bit, check the 1s on receipt. Parity block: row and column parity locate the bit.
  • Checksum: calculate, send with the data, recalculate, compare.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State one difference between data validation and data verification.2 marks
    Answer
    1. Validation checks that the data is reasonable / sensible.
    2. Verification checks that the data is the same as the original.

    Trap: "Verification verifies the data and validation validates the data" gains nothing.

  2. A school form has a field for year group. It must be a whole number from 7 to 11 inclusive. Name the validation check and give one value it rejects.2 marks
    Answer
    1. Range check.
    2. It rejects any value outside 7 to 11, for example 6 or 12.

    Trap: A limit check has only one end. This check has both ends, so it is a range check.

  3. A product code must be exactly 6 characters long. The algorithm outputs "Invalid" when `LENGTH(Code) <> 6`. Name the validation check performed and state one value that it rejects.2 marks
    Answer
    1. Length check.
    2. Any code that is not 6 characters long, for example AB12.

    Trap: Explaining what the code does ("it checks the length") is not naming the check.

  4. A clerk types customer records into a database from paper forms. Describe how double entry is used to verify the records as they are typed in.3 marks
    Answer
    1. The data is entered twice.
    2. The computer automatically compares the two entries.
    3. If they are not the same, there is an error.

    Trap: A person comparing the typed data with the form is a visual check, not double entry.

  5. The check digit is the remainder when the sum of the digits is divided by 10. It is appended to the number. (a) Find the new number for 7305. (b) The number 29184 is entered, where the last digit is the check digit. State whether it is accepted.3 marks
    Answer
    1. (a)
    2. Sum = 7 + 3 + 0 + 5 = 15.
    3. Remainder when 15 is divided by 10 is 5, so the new number is 73055.
    4. (b)
    5. Sum of the first four digits = 2 + 9 + 1 + 8 = 20. Remainder is 0.
    6. The last digit is 4, not 0, so the number is rejected.

    Trap: The check digit is the remainder, 5, not the whole sum, 15.

  6. Even parity is used. A byte has 7 data bits and the parity bit is the rightmost bit. (a) The data bits are 1101000. Write the byte. (b) The byte 10110110 is received. State whether an error is detected. (c) The byte 01101001 is received. State whether an error is detected.4 marks
    Answer
    1. (a)
    2. 1101000 has three 1s, which is odd.
    3. The parity bit must be 1 to make four 1s: 11010001.
    4. (b)
    5. 10110110 has five 1s, which is odd.
    6. Even parity is used, so there is an error.
    7. (c)
    8. 01101001 has four 1s, which is even, so no error is detected.

    Trap: The count in (b) includes the parity bit as well as the data bits.

  7. A file is sent to a server with a checksum calculated from the data. (a) Describe how the server uses the checksum to check the file. (b) The server's result matches the checksum received. State what this shows.4 marks
    Answer
    1. (a)
    2. It repeats the checksum calculation on the data received.
    3. It compares the result with the checksum received with the data.
    4. If the values are different, there is an error.
    5. (b)
    6. No error has occurred: the data is verified.

    Trap: Only adding the data values together is not a description of the method.

  8. Even parity block check is used. Each row is a byte with the parity bit in column 8. The last row is the parity byte. One bit changed during transfer. (a) Identify the byte and the column of the incorrect bit. (b) Write byte 3 as it was sent. | Byte | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | | 2 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | | 3 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | | 4 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | | parity | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |4 marks
    Answer
    1. (a)
    2. Count the 1s in each row. Byte 3 has five 1s, which is odd.
    3. Count the 1s in each column. Column 4 has three 1s, which is odd.
    4. The incorrect bit is in byte 3, column 4. It should be 0.
    5. (b)
    6. Byte 3 as sent: 11100001, which has four 1s.

    Trap: Rows alone only show which byte is wrong. Check the columns to find the bit.

  9. A sports club stores each member's membership code, for example JX0492: two capital letters followed by four digits. It also stores the member's age in whole years, which must be at least 16. Both are typed in from paper application forms. (a) Describe one validation check for the membership code and one for the age. Apply each to its field. (b) An assistant types JX0429 for member JX0492. Explain why both of your checks accept it. (c) Describe the verification method in which the computer, not a person, finds this error.7 marks
    Answer
    1. (a)
    2. Format check (or length check).
    3. The code must be two capital letters followed by four digits (or exactly 6 characters).
    4. Limit check, not a range check: there is only one end.
    5. The age must be 16 or more.
    6. (b)
    7. JX0429 is two capital letters and four digits, so it passes. Validation checks data is reasonable; it does not check that accurate data has been entered.
    8. (c)
    9. Double entry: the code is entered twice and the computer automatically compares the two entries.
    10. They do not match, so the error is found.

    Trap: "Checks the data is in the correct format" repeats the name and gains no description mark, and a visual check is done by a person, not the computer.

  10. A weather buoy sends blocks of readings to a base station. Odd parity is agreed. Each row is a byte with its parity bit in column 1. The last row is the parity byte, made from the column parity of bytes 1 to 4. One bit changed during transfer. (a) Identify the incorrect bit and write the corrected byte. (b) A technician says the parity byte is a check digit for the block. Explain why this is wrong. | Byte | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | | 2 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | | 3 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | | 4 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | | parity | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 |6 marks
    Answer
    1. (a)
    2. Odd parity, so a correct byte has an odd number of 1s. Bytes 1 and 4 have five, byte 3 has three. Byte 2 has four, which is even: byte 2 is wrong.
    3. Count each column, including the parity byte. Column 6 has two 1s, which is even; every other column has three.
    4. The incorrect bit is byte 2, column 6. It was received as 0 and should be 1.
    5. Corrected byte 2: 10110110, which has five 1s.
    6. (b)
    7. A check digit is a validation method: a digit worked out from the other digits of a number and appended when the number is entered.
    8. A parity block check is verification during data transfer. It finds the position of an incorrect bit.

    Trap: Using even parity out of habit makes bytes 1, 3 and 4 look wrong; and examiners reported confusion between check digits and parity blocks.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
Verification verifies the data and validation validates the data.Verification checks the data is the same as the original. Validation checks it is reasonable / sensible.
Format check: checks that the data is in the correct format.Format check: the date of birth must be dd/mm/yyyy.
A type check, for a colour that must be Red, Yellow or Blue.Existence check: compares the data entered to a list of possible values.
Data integrity makes sure that the data is correct.Data integrity makes sure the data is consistent and up to date.

Frequently asked questions

What is the difference between data validation and data verification?
Validation checks that data is reasonable or sensible and within set bounds. Verification checks that data is the same as the original. Neither is a guarantee: validation does not check that accurate data has been entered, and verification does not check that the original data is accurate.
How does a range check differ from a limit check?
A range check keeps data between two values and includes both ends. A limit check has only one end: the data must be after, or before, one set value. Name the check and say how it applies to the data in the question.
How is a check digit calculated?
A check digit is a digit added to the end of a number. The simple method adds all the digits and uses the remainder when the sum is divided by 10. For 4162 the sum is 13, so the check digit is 3 and the new number is 41623. The check digit is worked out again on entry and must match.
What is a visual check, and how does double entry work?
In a visual check, a person compares the entered data with the original document. In double entry, the data is entered twice and the computer automatically compares the two entries. Both show that the data matches what was given, but neither shows that the original is correct.
How does a checksum detect errors during data transmission?
A checksum is a value calculated from the data by an algorithm, and it is transmitted with the data. The receiver repeats the calculation on the data received and compares the result with the checksum that arrived. If the two values are different there is an error; if they match, the data is verified.
Is it enough to say that verification verifies the data and validation validates the data?
No. At this level of study that wording gains nothing. Verification checks that the data is the same as the original, and validation checks that it is reasonable or sensible. Give the check's job, not the name.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters