You are on page 1of 56

Data validation and

verification

https://www.bbc.co.uk/bitesize/guides/zd9cy9q/revision
/1
Validation and verification are two ways to check that the
data entered into a computer is correct. Data entered
incorrectly is of little use. There are two ways to reduce
errors when entering data into a computer system:

1. Data verification - is a process carried out by humans.

2. Data validation - is an automatic process carried out


by software.
Validation
• Validation is an automatic computer check to ensure
that the data entered is sensible and reasonable. It does
not check the accuracy of data.
• For example, a secondary school student is likely to be
aged between 11 and 16. The computer can be
programmed only to accept numbers between 11 and
16. This is a range check.

• However, this does not guarantee that the number


typed in is correct. For example, a student's age might
be 14, but if 11 is entered it will be valid but incorrect.
• Types of validation

• There are a number of validation types that can be used


to check the data that is being entered:

1. Range check
2. Data type check
3. Consistency check (also known as
inconsistency checks)
4. Reasonableness check
5. Presence check
6. Length check
7. Format check
Validation type How it works Example usage
Range check checks that data number of hours worked
entered is within a must be less than 50
specified range and more than 0

Data type check checks the data is in characters only are


the right format, such entered for a
as date, numeric,
person’s name.
currency, text,
alphanumeric

Consistency check data verified to what The data may include


(also known as is expected from a both gender (M or F)
corresponding field, and title (Mr, Mrs, Miss).
inconsistency
such as age matches If someone has entered
checks) given date of birth, M and Mrs, then the
two data is inconsistent.
Validation type How it works Example usage
Reasonableness A test to see if data falls For example, the
check within acceptable height of a person is
limits. A
not above 10 ft.
reasonableness check
can be used to
eliminate questionable
data

Presence check checks that data has in most databases a


been entered into a key field cannot be
field, and prevent left blank
users from leaving
certain information
empty
Validation type How it works Example usage
Format check A method of A National Insurance
validation which number must be in
ensures the data the form of
follows a set XX 99 99 99 X.
pattern (is in the
correct format), The first two and the
e.g. a National last characters must
Insurance number be letters. The other
six characters are
numbers. Any format
entered differently
to this will be
rejected.
Validation type How it works Example usage

Length check checks the data a password which


isn't too short or needs to be six
too long letters long
Verification

• Verification is performed to ensure that the data


entered exactly matches the original source.
• There can be some problem when an employee keys in
data that is written on a source document. Errors may
occur because it is difficult to read the writing, or the
person may simply make a typing mistake.
• There two types of errors that can occur when data is
typed incorrectly:
1. Typographical errors
2. Transposition errors
• Typographical errors are the typing errors that
we all make when we hit the wrong key.

• Transposition errors happen when we enter


numbers or characters in the wrong order. It is
very easy to do this when entering long numbers,
such as phone numbers, or when typing in an
unfamiliar place name.
Validation type
Verification HowHow it works
it works Example usage
Example usage
Reasonableness
type A test to see if data For example, the
check falls within acceptable height of a person is
Typographical are the typing
limits. A errors I sent down the
not above 10 ft.
errors that reasonableness
we all make check stree tand saw my
can be used to friends playing
wheneliminate
we hitquestionable
the
cricket.
wrong key.
data
Presence check checks that data in most databases a
Transposition happenhaswhen
beenwe entered
enter Ikey
wnetfield cannot
down the be
errors into or
numbers a field
characters in left blank
street and was my
Length check the wrong
checksorder. It is
the data frineds playing
a password which
very easy
isn't to
toodoshort
this or cricket.
needs to be six
whentoo
entering
long long letters long
numbers, such as phone
numbers
Verification

• Verification is performed to ensure that the data


entered exactly matches the original source.

• There are two main methods of verification:


• Double entry - entering the data twice and comparing
the two copies. This effectively doubles the workload,
and as most people are paid by the hour, it costs more
too.
• Proofreading data - this method involves someone
checking the data entered against the original
document. This is also time consuming and costly.
May 2011 Q5
• A local agent leaves a catalogue and order sheet for
homeowners, and checks on the order a week later. The
agent sends the details of the goods ordered to the Head
Office where they are processed. The completed order is
returned to the agent who distributes the goods and
collects payment.

• (a) Describe TWO methods homeowners may use to get


their orders to the agent each week. State ONE
disadvantage of EACH method. (4 marks)
Answer
• Order made by Email. Disadvantage—email may be
tagged as junk mail or sent to the wrong email address or
not read by the agent
• Order made by fax. Disadvantage—fax may be faded or
sent to the wrong fax number
• Order made by telephone. Disadvantage—typographical
or transcription error
• Order collected by the agent personally. Disadvantage—
time consuming
• (b) Operators at Head Office enter the orders, where they
are validated and verified.
• (i) Explain how the orders can be verified. (⅓ marks)
• (ii) Describe briefly TWO validation checks that might be
carried out on an agent's order. (4 marks)

Answer:
• Verification of the order:
• Comparing the order entered at the head office with the
original order sheet,
• or checking the order with the agent,
• or checking the order with the home owner who made
the order.
• Validation checks:
• Data type check—check if the correct type of data is
entered. For example, numeric data should be entered in
the quantity field
• Range check— check if data is within a given range. For
example, the quantity should not be less than 1 and not
more than 100
• Inconsistency check—check to see if the data on the
order are consistent. For example, if the title is Mr then
the gender should be Male
• Reasonableness check – check the order to see if it is
reasonable. For example, the pattern of previous orders
for a home owner can be used to determine if the current
order is within the usual order pattern.
• In most national census exercises, data are collected and
entered on forms by interviewers. Data from the forms
are then captured on tapes by data entry personnel.
Finally, the data from the tapes are merged into a single
file.
• (a) Identify ONE error that can occur during the data
collection phase. (1 mark)
• (b) Identify ONE error that can occur during the data
capture phase and describe how this type of error can be
reduced. (2 marks)
• ( c) Before the merged data can be used to generate
reports it must be validated. State themeaning of the
term 'validation'. (1 mark)
• (d) Name and describe THREE checks that can be used to
validate the data. (6 marks)
(a) Identify ONE error that can occur during the data
collection phase:
• Persons providing inaccurate information
• interviewer entering data incorrectly

• (b) Identify ONE error that can occur during the data
capture phase and describe how this type of error can
be reduced:
• Data entry personnel keying in incorrect data – another
data entry clerk can enter data from the same
questionnaire. The two files are compared, if there are no
differences then the file is saved; if there are inaccuracies
the data in the file is checked (double entry), proof-
reading
• (c) Before the merged data can be used to generate
reports it must be validated. State the meaning of the
term 'validation'.
• Validation is the checking of data to make sure it is
complete, reasonable, consistent and within acceptable
boundaries.

• (d) Name and describe THREE checks that can be used to


validate the data.
• Range check – check to see whether the data is within a
range of possible values.
• Reasonableness check – check to see whether the data
la reasonable.
• Data type check – check whether the data the data is of
the allowed type
• Inconsistency – check to see if the data in a field is
consistent with other data collected.
January 2013 Q6
• A student registration system at New Age High School
requires students to complete a registration form.
• (a) In order to verify the data, the data from this form are
keyed in by one clerical officer at the school and then
reentered by another clerical officer.

• (i) Name the data verification method described above.


(1 mark)
• (ii) Describe ONE type of error that the data verification
method would detect. (2 marks)
• (iii) State how the error in (a) (ii) above is detected.
• (1 mark)
• (iv) Outline bow the error in (a) (ii) above can be
corrected. (2 marks)
(i) Name the data verification method described above.
Answer: Double entry

(ii) Describe ONE type of error that the data verification


method would detect.
Answer: Typographical error - where the clerical officers
has keyed in wrong data

(iii) State how the error in (a) (ii) above is detected


Answer: when the data keyed in by the two clerical officers
do not match then either one or both is/are incorrect
(iv) Outline bow the error in (a) (ii) above can be
corrected
• Answer: When the error is detected then a supervisor
would check the original form and re-enter the data
entered by the student.

• (b) After the data are verified, a program scans the data
entered to validate the data submitted by the students.
State the name of EACH validation check for EACH of the
examples below:
• (i) The student's name does not contain any special
characters
• Answer: Data type
• (ii) The student's date of birth is after 31 August 2000
but before 01 September 2001.
• Answer: Range

• (iii) The student's weight is greater than 500 lbs.


• Answer: Reasonableness

• (iv) The student's age on the form is correct given the


student's date of birth.
Answer: (In)consistency
Past CSEC Questions
May 2013 – 5d
Explain TWO validation checks that the company can carry
out while entering data in the computer

Answer:
• Any two of the following:
 Range Check – to ensure that the input data is within a
given range. For example, the month number is between
1 and 12 inclusively.
 Reasonableness check – to find out if the input data is
realistic. For example, the height of a person is not
above 8 ft.
 Data type check – to find out if the input data is of the
correct type. For example, characters only are entered
for a person’s name.
 Inconsistency/consistency check – to ensure that the
data entered in one part of the form is consistent with
the data in another part of the form. For example, the
date of birth entered tallies with the present age of the
client.
January 2014
• Classify the following as examples of EITHER verification
OR validation.
• For EACH verification activity, state the purpose.
• For EACH validation activity, state the name of the check.
• (a) You are asked to enter a new password twice.
• (b) Check to verify that letters have been entered instead of
digits on a form ..
• (c) if Check to see the date entered for April is between I
and 30 inclusive.
• (d) Check that the gender of a person is "M", if the title is
"Mr".
• (e) Check to see if the year(yy) is entered as 68 instead of
86.
(a) You are asked to enter a new password twice
• Answer: (a) Verification – To ensure that you have typed
it exactly the same password both times and did not
made a mistake. It verifies that the first version is correct
by matching it against the second version.

• (b) Check to verify that letters have been entered


instead of digits on a form ..
• Answer: Validation – data type check

• (c) if Check to see the date entered for April is between I


and 30 inclusive.
Answer: Validation – Range check
• (d) Check that the gender of a person is "M", if the title
is "Mr".
• Answer: Validation – Inconsistency check

• (e) Check to see if the year(yy) is entered as 68 instead


of 86
Answer: Verification – to ensure that the correct year is
entered
May 2014 Q6(e)
Data on hours worked by employees are entered by the
clerical staff. Outline one method used to verify the
accuracy of the data entered. (2 marks)

Answer:
• Data is entered by one staff member and the same data is
entered by another staff. Both sets of data are then
compared to ensure that they are the same (double
entry).
• Use of proof-reading is also acceptable.
January 2015 Q5

Data has been collected for a survey and entered into a


computer using a data entry form
(a) State TWO methods that can be used to ensure that the
data is entered accurately into the computer.
Answer: proofreading, double entry, or scan from original
document
(b) Explain how the TWO methods named in (a) above
ensure that the data is entered accurately into the
computer.

• Answers:
• Original data is the same as data in the computer
• Data is entered twice into the computer and compared to
see if they match
• No human error caused by keying in data
(c) State the names of THREE checks and explain how they
work to ensure that the data entered is valid.

Answer: Any three


• Range check – data within a given range
• Data type check – data appropriate to the field required
such as date, numeric, alphanumeric, text
• Consistency check – data verified to what is expected
from a corresponding field, such as age matches given
date of birth
• Reasonableness check – data is within acceptable limits
May 2016 Q6
Data from a paper base form are being entered into a
computer by a data entry clerk.

(a) List two types of data entry errors which would occur:
1. Spelling errors
2. Grammatical errors

(b) State two verification tests which may be done to make


sure that the data entered are correct.
1. Double entry
2. Proofreading data
(c) The data entry form has a field to store the age of
students attending a secondary school. Using the table
below state three validation checks that can be applied to
the age field and explain what each check does.

Answer:
• Inconsistency/consistency - To ensure that the student's
age on the form is correct given the student's date of
birth.
• Range Check – to ensure that the age falls within a given
range. For example, a secondary school student is likely
to be between 11 and 16 years old.
• Data type check - Checks that the data entered is of an
expected type, e.g. number
January 2017 Q6 (e)
• (e) State ONE data check and explain how it can be used
to confirm that the data entered is accurate.

• Answer:
• Data type check—check if the correct type of data is
entered. For example, numeric data should be entered
• Range check— check if data is within a given range.
• Inconsistency check—check to see if the data on the
order are consistent.
• Reasonableness check – check the order to see if it is
reasonable.
Data Required Example of Correct Type of Suitable Explanation of How the Data
Data Entered Data Check Check Works
Gender Male (or M) Consistency Be specific with response
Female (or F) (inconsistency) Male or Female (or some
OR variation to mean that)
Data Type
Date of birth >=01/01/1996 and Range check Relate response here to a
<=01/01/2005 or date and/or specify a range
Data type Check for acceptable age
Or Outline an acceptable format
Format Check for the date (e.g.
mm/dd/yyyy)
Number of 1 or 4 Reasonableness Use a range of devices
mobile devices OR or owned by an individual that
owned 0–4 Data Type (e.g. is realistic or reasonable
number) Ensure your response refers
or to a whole number or integer
Range value
Specify an upper limit and
lower limit for number of
devices owned (e.g. 0 - 3)
Answer
Check Field(s) Reason

Data type Amount -Amount: Numeric value


Date -Date should be in correct date format mm/dd/yyyy

Consistency From → Amount -From: Amount of funds is enough in the From Account

TO → From -Amount: Amount is within the daily limit


-Ensure that TO and FROM accounts are not the same

Range Amount -Data is within a given range e.g. -Amount <= 5000
Date -Within value limit of month and day
Past CSEC Questions
Classify each of the following examples of EITHER
verification OR validation
For EACH validation activity, state the name of the check.

(a) You are asked to enter a new password twice.


Answer: Verification – To ensure that you have typed it
exactly the same password both times and did not made a
mistake. It verifies that the first version is correct by
matching it against the second version.

(b) Check to verify that letters have been entered instead


of digits on a form.
Answer: Validation – data type check
(c) Check to see if the date entered for April is between 1
and 30 inclusive.
Answer: Validation – Range check

(d) Check that the gender of a person is “M”, if he title is


“Mr”.
Answer: Validation – Inconsistency check

(e) Check to see if the year (yy) is entered as 68 instead of


86
Answer: Verification – to ensure that the correct year is
entered
Data validation and verification - Test
1. What is an automatic computer check to make
sure data entered is sensible and reasonable
known as?
a) double entry
b) verification
c) Validation

2. What validation type would make sure a number


is not entered in the name field?
a) length check
b) data type check
c) presence check
3. What validation type would you use to
check that numbers fell within a certain
range?
a) range check
b) presence check
c) check digit

4. What validation type checks that a field is not


left blank?
a) format check
b) length check
c) presence check
5. What validation type checks that a field is not
left blank?
a) format check
b) length check
c) presence check

6. What validation type checks a minimum


number of characters have been entered?
a) length check
b) format check
c) range check
7. Data is to be entered into a computer in the
format YYMMDD. Which of the following is not a
valid date?
a) 310921
b) 211113
c) 21st June 2004

8. Which of the following statements is false?


a) validation can check that the data is sensible
b) validation can check that the data falls
between certain allowable boundaries
c) validation can check that the data is correct
9. Which of the following is NOT a method of
verification?
a) double entry - typing the data in twice and getting
the computer to check the second version against
the first
b) using presence, range and length checks to make
sure that no mistakes happen
c) printing out what you have typed in and comparing
it against the source data
Answers

1. An automatic computer check to make sure data


entered is sensible and reasonable is known
as validation.
2. A data type is entered would make sure that the
correct data is entered
3. A presence check prevents a field from being left blank.

You might also like