5. Validation and Verification-obj 4 and 5
5. Validation and Verification-obj 4 and 5
5. Validation and Verification-obj 4 and 5
You cannot assume that all data entered and used by computers is accurate. Humans can make mistakes and it can be very easy to
enter incorrect or inaccurate data when you are tired, in a hurry or simply by accident. This may cause a program to malfunction
or cause incorrect information to be stored about someone or something. Imagine you applied for a passport and the data entry
personnel entered your birth year as 1903 instead of 1993. Your passport would say that you are over a hundred years old.
Software and hardware can cause data errors. If software is faulty, it may corrupt or delete data. If hardware is not working
properly, it may cause a computer to malfunction. If you are in the middle of working on something, the data may be lost. If there
is a problem with the hard disk, saved data may be irretrievable.
Computers, electrical faults and faulty cabling can cause transmission errors, which is when the data received by a computer or
system is not the same as what was sent by another computer.
Deliberate errors are errors made on purpose, usually for gain or to cause disorder. To get a bigger loan, someone may
enter false information about their salary on a loan application.
There are two ways to prevent data errors caused by humans: data verification and data validation.
Data Verification
Data verification ensures that data entered into a computer contains no errors at all. It is a very thorough way of making sure that
data entered is correct. Two methods of data verification are double-entry and proofreading.
Double-entry
Double-entry is where the same data is entered twice, sometimes by different people. If the data differs between the two entries, it
does not get processed. It can be expensive and time consuming to use this method, but it does ensure very accurate data capture.
A simpler example of double-entry is when a program asks you to retype a password, perhaps when you set up an e-mail account.
When you type, the screen shows only asterisks (*) so that no one can see your password. But this means you cannot see whether
you have mistyped any characters. Without double entry, if you mistype a character when you set up your password, the password
in your head will not match what you told the program and will be rejected when you type it incorrectly. Double-entry asks you to
type the password twice and accepts the password only if the two versions match.
Proofreading
Proofreading checks the data entered against the data on the original source document. The person entering the data reads the
source document and checks that it matches what he or she has entered into the computer. Sometimes a second person will check
the entered data. This is very time consuming. If you have to enter large amounts of data from documents into a computer, it may
be wise to proofread the data you have entered. It is easy to make mistakes when you have been working on the same task for a
long time.
Data Validation
Data validation uses a variety of checks to make sure that data is as accurate and complete as possible. It does not check the
complete accuracy of data, but it does help ensure that fewer mistakes are made. If data does not pass the checks, the program
may return an error or the field will not be filled in. The checks compare the user-entered data against a rule. The type of check
depends on the nature of the data that is entered.
Range checks
A range check ensures that numbers entered fall within a specific range. If you are entering times of the day, you may need to
check that the values for hours cannot go higher than 24.
Reasonableness checks
Reasonableness checks ensure that data is not completely unrealistic. If you are entering salary information into a payroll system,
a reasonableness check will ensure that you do not enter extra zeros by mistake.
Consistency checks
Consistency checks compare data you have entered against other data you have entered. If you enter a person’s year of birth and
their age in separate fields, a consistency check will ensure that the two fields correspond with each other. Consistency checks can
be used to make sure that false or dishonest data has not been entered.
Presence checks
Documents and forms have required fields and optional fields. A required field is one that has to contain a value whereas an
optional field can be left blank. In an application for a bank account, your identifying number and address will be required fields
and your cell phone number may be an optional field. A presence check is used to ensure that the required fields contain data.
Length checks
A length check determines whether the entered data is the correct length – the right number of digits. Area codes and phone
numbers usually have a fixed length. If a number is entered that is longer or shorter than this length, the program will return an
1
error. An easy way to ensure that data is the correct length is to create a field that will not allow the user to continue unless all the
spaces for digits have been filled in.
Check digits
Bar codes and other number sequences include a check digit that is calculated from all the other digits using an algorithm. When
the number sequence is entered in a field, the computer can separate the check digit from the other digits, use the algorithm to
calculate a check digit and compare it with the entered check digit. If the calculated check digit matches the entered check digit,
the sequence is correct.
Parity checks
If a computer needs to understand data, the data must be reduced to its basic form of 1s and 0s. Data transmission sometimes
corrupts 1s and 0s by changing a 1 into a 0 or a 0 into a 1. One change can be detected by adding a parity bit. In an odd-parity
system the parity bit is set so the total number of 1s in a bit pattern is an odd number. In an even-parity system the parity bit is set
so the total number of 1s in a bit pattern is an even number.
Suppose you want to send 10011 using odd parity, there are three 1s, there is an odd number, so the parity bit is 0. You send
100110, which consists of data 10011 and parity bit is 0. Now suppose that one data bit is corrupted during transmission so the
receiver gets 100010, which consists of data 10001 and parity bit 0. The received data contains two 1s, so the parity bit should be
1. The parity check has detected that a data bit was corrupted during transmission.