Professional Documents
Culture Documents
Unit 8.7 - Data Validation and Data Verification
Unit 8.7 - Data Validation and Data Verification
It
uses routines, often called validation rules, to check for correctness or meaningfulness of data that are
input to the system. Data validation in programs often involves a loop structure that persists until the
user has entered a suitable data item.
Types of data validation checks:
A range check is a check to make sure a number is within a certain range e.g. checking whether a value
for month in a date is between 1 and 12. Range checking is often used with arrays, since using a number
outside of the upper limit of an array may cause the program to crash.
A reasonableness check is a test to determine whether a value conforms to specified criteria e.g.
checking for gender being male (M) or female (F).
In programming languages a data type is an attribute of a piece of data that tells the computer (and the
programmer) something about what kind of data is being dealt with. This involves setting constraints on
the data, such as what values that data can take on, and what operations may be performed on that data.
Common data types may include: integers, floating-point numbers (decimals), alphanumeric strings,
dates and times. Data type checking is done internally by the compiler to ensure that data entered is
compatible with the data type of a variable.
Data verification refers to the methods used to check for errors that may occur when data is
copied from one medium to another. (eg paper to disk, disk to disk, memory to disk)
Data verification checks for two types of errors: transcription and transmission errors.
Methods used for verification...
Double keying
Used to check for transcription errors. The data is entered twice (by two
different people). The computer will only accept the data for processing if
the two versions are identical.
Visual check
Checking for transcription errors by looking through the data e.g. Proofreading a typed document.
Parity check
A consistency check is a test performed to determine if the data has any internal conflicts. For example,
Cyclic Redundancy Check, CRC is a method of detecting errors in data transmission. A CRC is data
that is sent with a block of data, such that on the receiving end, the CRC can be used to verify if data
was all received correctly. CRC is therefore a data verification check.