0% found this document useful (0 votes)
25 views

7.5 Validation & Verification

The document explains the concepts of validation and verification in data entry, highlighting that validation checks ensure data is sensible but not necessarily accurate, while verification confirms data accuracy against the original source. Various types of validation checks are discussed, including range, length, presence, type, format, and check digits. Verification methods include double entry and visual checks to ensure data integrity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

7.5 Validation & Verification

The document explains the concepts of validation and verification in data entry, highlighting that validation checks ensure data is sensible but not necessarily accurate, while verification confirms data accuracy against the original source. Various types of validation checks are discussed, including range, length, presence, type, format, and check digits. Verification methods include double entry and visual checks to ensure data integrity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Validation and Verification

Validation and verification are two ways to


check that the data entered into a computer is
correct.
Computer Science 2210
Compiled By: Bilal Khan

Computer Science 2210


Compiled By: Bilal Khan
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.
Computer Science 2210
Compiled By: Bilal Khan
Types of validation checks:

• range checks
• length checks
• type checks
• presence checks
• format checks
• check digits
Computer Science 2210
Compiled By: Bilal Khan
Range check:
Checks that a value falls within the specified
range
OR
Value of a number is between an upper value
and a lower value.

Example: Number of hours worked must be less


than 50 and more than 0
Computer Science 2210
Compiled By: Bilal Khan
Range check:
Example: checking that percentage marks are between
0 and 100 inclusive:

Computer Science 2210


Compiled By: Bilal Khan
Length check:
Checks the data isn't too short or too
long
OR
that data contains an exact number of
characters.

Example: A password which needs to be six


letters long.
Computer Science 2210
Compiled By: Bilal Khan
Length check:
Example: password must be exactly eight characters in length so
that passwords with seven or fewer characters or nine or
more characters would be rejected, for instance:

Computer Science 2210


Compiled By: Bilal Khan
Length check:
• Example: or that the data entered is a reasonable number of
characters, for example, a family name could be between two
and thirty characters inclusive so that names with one
character or thirty-one or more characters would be rejected:

Computer Science 2210


Compiled By: Bilal Khan
Presence check:
Checks that data has been entered into a field. In most
databases a key field cannot be left blank.
Example: an email address for an online transaction
must be completed.

Computer Science 2210


Compiled By: Bilal Khan
Type check:
Checks that the data entered is of a given data type
Example: The number of brothers or sisters would be
an integer (whole number).

Computer Science 2210


Compiled By: Bilal Khan
Library routines
Many programming language development systems include library
routines that are ready to incorporate into a program.
These routines are fully tested and ready for use. These standard
library routines perform many types of task:

• MOD – returns remainder of a division


• DIV – returns the quotient (i.e. the whole number part) of a
division
• ROUND – returns a value rounded to a given number of decimal
places
• RANDOM – returns a random number

Examples :
Value1 MOD(10,3) returns the remainder of 10 divided by 3
Value2 DIV(10,3) returns the quotient of 10 divided by 3
Value3 ROUND(6.97354, 2) returns the value rounded to 2 decimal places
Value4 RANDOM() returns a random number between 0 and 1 inclusive
Computer Science 2210
Compiled By: Bilal Khan
Format check:
A format check checks that the characters entered
conform to a pre-defined pattern,
OR
Checks the data is in the right format.

Example: A National Insurance number is in the


form LL 99 99 99 L where L is any letter and 9 is
any number
OR
Format for date is MM/DD/YY or DD/MM/YYYY
Computer Science 2210
Compiled By: Bilal Khan
Check digit:
(Note: How to find check digit? See Chapter2: Data Transmission: Method of error detection)

A check digit is the final digit included in a code;


it is calculated from all the other digits in the
code.
Example: Check digits are used for barcodes, product codes,
International Standard Book Numbers (ISBN) and Vehicle
Identification Numbers (VIN).

Computer Science 2210


Compiled By: Bilal Khan
Check digit:
Check digits are used to identify errors in
data entry caused by mis-typing or mis-
scanning a barcode.
They can usually detect the following types of error:
• an incorrect digit entered, for example, 5327 entered instead
of 5307
• transposition errors where two numbers have changed order
for example 5037 instead of 5307
• omitted or extra digits, for example, 537 instead of 5307 or
53107 instead of 5307
• phonetic errors, for example, 13, thirteen, instead of 30, thirty.
Computer Science 2210
Compiled By: Bilal Khan
Verification
Verification is checking that data has been
accurately copied from one source to another
OR
To ensure that the data entered exactly matches the
original source

There are two main methods of verification:


• Double entry -
• Screen/Visual Check/Proofreading data
Computer Science 2210
Compiled By: Bilal Khan
Double entry:
Entering the data twice,
sometimes by different
operators.
The computer system
compares both entries
and if they are different
outputs an error
message requesting
that the data is entered
again.
Computer Science 2210
Compiled By: Bilal Khan
Screen/Visual Check/Proofreading data:

A screen/visual check is a manual check completed


by the user who is entering the data.
When the data entry is complete the data is
displayed on the screen and the user is asked to
confirm that it is correct before continuing.
The user either checks the data on the screen
against a paper document that is being used as
an input form or, confirms whether it is correct
from their own knowledge.
Computer Science 2210
Compiled By: Bilal Khan

You might also like