AS Level ICT Data entry: Creating validation checks
Validation checks Validation checks can be created in both databases and spreadsheets The methods used to create validation checks in both types of data management systems will depend upon the specific program being used to solve the problem The examples used here relate to MS Access and MS Excel, but as a general rule the methods used will be similar to those used in other data management systems
Validation checks - Databases The following example shows how a validation check has been set up for a particular field in a database The field is intended to contain numerical data between an upper and a lower limit
Validation checks - Databases The field that is to have a validation check is the ‘Numerical Value’ field If the validation check is set up correctly, only numerical values between but not including 0 and 1000 should be allowed to be entered into this field
Validation checks - Databases To add a validation rule to a field, the cursor should be clicked in the appropriate data type cell This will display the relevant parameters for that field
Validation checks - Databases Clicking the cursor in the ‘Validation Rule’ cell begins the process of setting the requisite validation rule The tab at the end of the cell appears, and must be clicked on The ‘Expression Builder’ will then be displayed
Validation checks - Databases Using the various mathematical tools available of the ‘Expression Builder’ toolbar, the validation rule is entered into the box at the top of the display
Validation checks - Databases Once the validation rule has been entered, ‘OK’ is clicked The display will close, and the validation rule will appear in the ‘Validation Rule’ cell
Validation checks - Databases
The data table should then be saved and the validation rule tested by entering: –Erroneous data (i.e. data that is known to be wrong) –Extreme data (i.e. data that is at the extreme range of that allowed) –Normal data (i.e. data that is known to be correct)
Validation checks - Databases Erroneous data
Validation checks - Databases Extreme data
Validation checks - Databases Extreme data
Validation checks - Databases Normal data
Validation checks - Databases An error message only appears when data that does not match the validation rule is entered into the specified field The error messages are generic error messages; designers can create their own error messages by entering text into the ‘Validation Text’ cell
Validation checks - Databases The error message set by the designer will now appear whenever incorrect data is entered into the field
Validation checks - Spreadsheets The following example shows how a validation check has been set up for particular cells in on a spreadsheet The cells are intended to contain numerical data between preset upper and a lower limits
Validation checks - Spreadsheets To set a validation rules for a cell or cells, the cells must first be highlighted The ‘Data’ option on the toolbar is then selected, and the ‘Validation’ option on the dropdown menu is clicked
Validation checks - Spreadsheets The ‘Data Validation’ display allow the designer to set the values for the cells, any input message they think will assist the user, and an error alert that will appear if incorrect data is entered
Validation checks - Spreadsheets In this example the settings selected will only allow whole numbers between 1 and 999 to be entered into the selected cells The data validation rule will become active once the ‘OK’ button is clicked
Validation checks - Spreadsheets Even without an input message or an error alert being set by the designer, incorrect data cannot be entered into any of the selected cells
Validation checks - Spreadsheets Examples of extreme data being used to test the validation rule
Validation checks - Spreadsheets It is good practice for designers to set the ‘Input Message’ for validation checks as these will aid the user and go some way to preventing incorrect data being entered
Validation checks - Spreadsheets Even before data has been entered, the user can see the limitations that have been set for a cell
Validation checks - Spreadsheets If, despite the input message, the user attempts to enter incorrect data, an ‘Error Alert’ will be displayed and the user will not be able to proceed until the incorrect data is erased
Validation checks - Spreadsheets
AS Level ICT Data entry: Creating validation checks