Data Integrity
Data Integrity
Data Integrity
VALIDATION
Validation is a process of checking if data satisfies certain criteria when input i.e. falls
within accepted boundaries. It checks whether the data conforms to a give criteria or
whether the data is sensible.
Type Check It is the checking of the type of data, i.e. the checking if the data
is in the same type/format as it is required or not.
Range check this checks whether data is within given/acceptable values e.g.
checks if a person’s age is > 0 but is also < 140.
Length check this checks if the input data contains the required number of
characters e.g. if a field needs 6 digits, then inputting 5 digits or
7 digits, for example, should be rejected.
Character check this checks that the input data doesn’t contain invalid (type
check) characters; e.g. a person’s name shouldn’t contain
numbers.
Format check this checks that data is in a specified format (template) e.g.
(picture check) date should be in the form dd/mm/yyyy.
Existence check, for example, that a file exists with the filename referred to in the
data entry. (e.g. barcode must correlate to an item
Presence check check that data is actually present and not missed out e.g. in an
electronic form, somebody’s telephone number may be a
required field.
Consistency check/ this checks if fields correspond (tie up) with each other e.g. if Mr.
Cross field check has been typed into a field called “Title” then the “Gender” field
must contain M or Male.
this is an extra digit added to a number which is calculated from
Check digit the digits; the computer re-calculates and validates the check
digit following input of the number
NOTE: check digits can identify 3 types of error:
(1) if 2 digits have been inverted e.g. 23459 instead of 23549
(2) an incorrect digit entered e.g. 23559 instead of 23549
(3) a digit missed out altogether e.g. 2359 instead of 23549)
EXAMPLE
98 ÷ 11 = 8 remainder 10
11 – 10 = 1
This gives a check digit of 1
Example 2
To check the correctness of a check digit the computer re-calculates it as follows:
The ISBN to check is: 0 - 1 3 1 5 - 2 4 4 7 - X
(i) the position of each digit is considered:
(ii) each digit is then multiplied by its digit position and the totals added together
(iii) the total is then divided by 11; if there is no remainder then the check digit is
correct:
132 ÷ 11 = 12 remainder 0
hence the check digit is correct
VERIFICATION
Verification means tallying the input data with the original data to make sure that
there have been no transcription errors.
checks data entered is accurate
Verification is a way of preventing errors when data is copied from one medium to
another (e.g. from paper to disk/CD, from memory to DVD, etc.). There are a number
of ways in which verification can be done:
Double entry: in this method, data is entered twice (using two different people);
the data is only accepted if both versions match up. Often used to verify passwords
by asking them to be typed in again by the same person.
Visual check: this is checking for errors by comparing entered data with the original
document.
Data Verification during Data Transfer
Errors may occur when data moved from one point to another point in system
Checksum Check:
• Data sent from one place to another as block of bytes rather than individual bytes
• Computer adds together all bytes being sent
• Any bits lost at most-significant end as carry ignored so answer is an 8 bit number
• Checksum calculated before and after data sent
• If two bytes are different, that is the received and the one which was sent then an
error occurred therefore block of bytes must be sent again
Parity bit
A parity bit is a check bit, which is added to a block of data for error detection
purposes. It is used to validate the integrity of the data. The value of the parity bit is
assigned either 0 or 1 that makes the number of 1s in the message block either even
or odd depending upon the type of parity
Example
In order to give a better chance of errors being discovered, a block of data can have
vertical as well as horizontal checks. Complete the table by inserting the bits that
should be on the bottom row.