unit 8.7 - data validation and data verification

Upload: latoya-anderson-mcdonald

Post on 14-Feb-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/23/2019 Unit 8.7 - Data Validation and Data Verification

    1/2

    Data validationis the process of ensuring that a program operates on clean, correct and useful data. Ituses 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 checkis 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 1. !ange 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 "#$ or female "%$.

    In programming languages a data typeis an attribute of a piece of data that tells the computer "and theprogrammer$ 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.

    &ommon data types may include: integers, floating'point numbers "decimals$, alphanumeric strings,

    dates and times. Data type checkingis done internally by the compiler to ensure that data entered iscompatible with the data type of a variable.

    Data verificationrefers to the methods used to check for errors that may occur when data iscopied 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 transcriptionerrors. The data is entered twice (by two

    different peope). The computer wi ony accept the data for processing ifthe two versions are identica.

    Visual check !hecking for transcription errorsby ooking through the data e.g. "roof#

    reading a typed document.

    Parity check Used to check for transmissionerrorsover networks or between memory

    and disk.

    $n e%tra bit is added to each binary number before it is transmitted. &ven

    parity systems make sure that each number has an even number of '' bits.

    $fter transmission, each binary number is checked to see if it sti has aneven number of '' bits.

    Example(&ven parity)

    f 11010111is transmitted ...(* '' bits)and 11010011is received ... (+ '' bits)

    then the computer knows a corruption of the data has occurred.

  • 7/23/2019 Unit 8.7 - Data Validation and Data Verification

    2/2

    A consistency checkis a test performed to determine if the data has any internal conflicts. %or e(ample,

    Cyclic Redundancy Check, CRCis a method of detecting errors in data transmission. A &!& is data

    that is sent with a block of data, such that on the receiving end, the &!& can be used to verify if data

    was all received correctly. &!& is therefore a data verification check.