Title: IT Applications Theory Slideshows
1- IT Applications Theory Slideshows
- Data Validation
- Efficient Processing
- By Mark Kelly
- McKinnon Secondary College
- Vceit.com
2Data Validation
- The step taken after data input.
- Ensures data are reasonable.
- Cannot check for accuracy of data.
- Helps prevents processing of bad data to create
bad information. - GIGO garbage in, garbage out
3Validation
- E.g. a form says a VCE student was born in
England. - Validation can tell its reasonable - but it
still may be complete rubbish. - Another form that says the student was born in
45.67 is clearly not reasonable.
4Whats reasonable?
- The main validation checks
- Type check
- Range check
- Existence check (or presence check)
5Type check
- A value should be of the right type
- Names should be text
- Dates should be dd/mm/yyyy format
- Number of pets should be numeric
- A photo field should contain a JPG image rather
than a spreadsheet - A credit card number field rejects the letter O
typed instead of a zero
6Range check
- Data should be within a certain range
- Kindergarten students ages should be between 3
and 6 - Number of pets should be gt 0
- Data must exist in a limited list of options
- State of residence must be in (Vic, SA, Qld, WA,
ACT, Tas, NT). Sex must be M or F.
7Range check
- Data must be unique
- e.g. a phone number, customer ID
- Data must be of a minimum, maximum or fixed
length - e.g. credit card number has 16 digits
- Data must have a given format
- E.g. user ID must have 3 letters and 2 digits
- Date must be in dd-mm-yyyy format
8Existence check
- Is the data present?
- In a pizza delivery list, leaving off the
customers name may not be vital, but leaving off
the address is. - Existence check can reject records that lack
vital data.
9Warning!
- Dont make validation so strict that valid data
are rejected. - Data can be unexpected but accurate!
- kindergarten child could be 8 years old in rare
circumstances - mandating the entry of a phone number would
wrongly reject people with no phone - Validation should reject absurd data, not
slightly odd data!
10Bad validation
- American websites that insist on a 5 digit zip
code (postcode) even if youre not American! - Databases that reject addresses with no Street/
Avenue/Road/Lane (etc) value some addresses
dont have them. - Testing for existence in a limited list when the
list is not actually limited. (e.g. Title must
be one ofMr, Miss, Mrs, Dr, Sir, Madam)
11Manual Electronic
- Some data needs a humans common sense to detect
unreasonable entries - Spelling of names
- Entry of Adam Sandler in a database of talented
actors - Jane Smith registered as a male
- Other checks are better done electronically
- Faster, more accurate to get a database to check
for missing ID number values
12Some validation techniques
- Check digits
- Used for numerical data. An extra digit is added
to a number which is calculated from the digits. - The computer checks this calculation when data
are entered, e.g., The ISBN for a book. The last
digit is a check digit calculated using a modulus
11 method. - Detects mis-typing.
13Some validation techniques
- Spelling and grammar check
- Looks for spelling and grammatical errors.
- Consistency Checks
- Checks fields to ensure data in these fields
corresponds, e.g., If Title "Mr.", then Gender
"M".
14To prevent invalid data entry
- Drop-down menus or lists
- Force data to be entered from a pre-made
selection - States of Australia
- Months of the year
15Helping users
- Give examples or advice about expected data
formats
Enter your 10-character regocode (case sensitive)
Date (dd/mm/yyyy)
__ __ __ __ - __ __ __ __ - __ __
Note how this form clearly indicates which fields
are required and which are optional
16Calendar Control
- Date cannot be invalid since it must be chosen
from a set of valid dates - Can still be inaccurate however!
17Calendar control helps users
- User does not have to guess correct date format
expected - 23/08/09?
- 23-08-2009?
- 23 Aug 09?
- 08/23/09 (US format)?
- 092308 (Asian format)?
18Calendar control helps organisations
- Date data is not ambiguous
- Does 02/05/06 entered mean
- 2 May 2006?
- 5 Feb 2006?
- 6 May 2002?
A bad date could be prevented with good validation
19Efficient Processing
- Processing converts raw data into useful
information - E.g. averaging numbers, sorting class lists,
converting WAV to MP3, formatting text, resizing
pictures, looking up IP address from a URL,
converting JPG data into pixels onscreen,
compressing video data into DivX format, creating
a HTML page from a GUI web editor, searching for
customers with overdue accounts.
20Efficient?
- Saving waste of
- Time
- Money
- Labour (or effort)
21Saving processing time
- Use the best tool for the job
- Database for manipulating large data sets
- Spreadsheet for calculations rather than storage
and retrieval tasks - A specialised tool (e.g. MS Project for a Gantt
chart) is usually quicker than a generic tool
(e.g. Excel) - Use equipment of adequate power e.g. rendering
video on a PC with old CPU and little RAM will
take ages.
22Saving processing time
- Automate tasks where possible
- Use macros or scripts
- Use dedicated utilities (e.g. batch file renamer,
batch MP3 tag converter, batch image format
converter or resizer)
This tool takes a batch of JPG images, creates
thumbnailed copies of the images, and creates a
HTML page linking the thumbnails to the large
image. In 5 minutes, it can save 5 hours human
effort.
23Saving effort
- Apart from saving time, automating tasks with
macros or scripts or dedicated utilities will
save person-hours and sweat. - Develop efficient procedures so data is not
double-handled (processed in two steps when it
could have been handled in one)
24Saving effort
- Train staff properly staff work far more
efficiently if they can exploit the full power of
a system - Select intuitive software that takes little
training and reduces human error rates - Use logical file management habits to save effort
locating data, or re-creating data that has been
lost or damaged.
25Saving money
- Time money, so use the previous time-saving
tips to also save money. - Efficient processing more work achieved in the
same time greater profit.
26IT APPLICATIONS SLIDESHOWS
- By Mark Kelly
- McKinnon Secondary College
- vceit.com
These slideshows may be freely used, modified or
distributed by teachers and students anywhere on
the planet (but not elsewhere). They may NOT be
sold. They must NOT be redistributed if you
modify them.