Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Data validation is the process of ensuring that a program operates on clean, correct and useful data.

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

Used to check for transmission errors over networks or between memory


and disk.
An extra bit is added to each binary number before it is transmitted. Even
parity systems make sure that each number has an even number of '1' bits.
After transmission, each binary number is checked to see if it still has an
even number of '1' bits.
Example (Even parity)
If 11010111 is transmitted ...(6 '1' bits)
and 11010011 is received ... (5 '1' bits)
then the computer knows a corruption of the data has occurred.

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.

You might also like