Data Organization and Data Control
2.1 Data Input and Sources of Error
Data Input method (Revision in Chapter 1)
Text: Barcode reader, keyboard, QR code reader
Image scanner + OCR software
Image: image Scanner, camera, (camera function in smart phone)
Sources of error caused by manual input
- data source error
- Transcription error
- transposition error
Garbage in Garbage Out (GIGO)
2.2 Data Control (Data validation , Data verification)
Data validation is the process of comparing data with a set of rules or values to make sure that the data is reasonable and valid.
(reasonable check)
Google Forms provides some basic Data validation check.
Field presence check (set as required field, cannot be empty)
Field length check (e.g. your student Id must have six digit, HKID:8, telephone number:8)
Range check (e.g. age, marks)
Fixed value check (e.g Sex: M, F)
Format check (e.g. email address)
Type Check (integer, string, date)
Check digits (HKID - Modulo-11, parity check, ISBN-10 and ISBN-13)
Exercise 1
Q1 Error detection using Even parity
Which data has errors ?
Q2. Error correction using even parity
Only 1 bit has error. Identify the bit and correct it.
Practical
Validate HKID and ISBN-10
With reference to the first worksheet which show the validation of HKID, complete the validation of ISBN-10 in the 2nd worksheet
Formula provided
K12
D2
=MOD(K11,11)
=IF(K12=0,"Valid","Invalid")
Designing a form to facilitate data validation.
- Required fields
- radio buttons (Multiple choice in Google Form) - fixed value check
- drop down list.
Oct 2 (Demon checking, Not yet show javascript)
Use JavaScript to check.
HTML5 also facilitate checking
HTML5 - Input type "month", Range check of number
Data verification check
Input data twice. (password setting)
Double data entry
Example of verification:
In S3, your choice of stream is printed out for your checking and signature.
In parent’s day, information was printed for checking.
CAPTCHA (an acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart") is used to used to determine whether or not the user is human.
Class work
Complete Activities 1 (P.48 - 50)
2.3 Data Hierarchy (P.50-52)
Field - Record - Table - Database
2.4 Database Management System
A database is a collection of interrelated data files organized in tables of specific formats.
Key field - uniquely identify a record.
A database management system is a computer program to
- manage the database structure
- store, organize and retrieve data in a database.
Examples of DBMS
Practical 1 (Refer to P.55 - 57)
Try out using SQL
Open MySQL control center (Program - Database Management - SQL - MySQL control Center)
Type SQL commands to test different kinds of basics functions of SQL.
Copy all the statements and put it in a Google Docs named "S4XYY_DBex1" under the shared folder with me.
The SQL provided for you. Make sure you understand all the statements.
Practical 2:
Activity 3 (P.58-59)
Use Microsoft Access to
- create / modify / delete table (Data definition)
- add / update / delete records (Data manipulation)
- Browse record (Select .. from .. where ..) (Data manipulation)
2.4.2 Essential features for database management
Filter record / sort record / create index
Data entry forms
Query / SQL
Reports
You can learn more about SQL in the following web site:
2.5 File Access Modes (Depends on Media / Design)
Sequential access mode (example: Magnetic tape)
Direct Access mode (Hard disk)
How hard disk works: http://www.youtube.com/watch?v=YmZORFMkxD4
DO not defrag your Solid State Harddisk.
P.65 Comparison
Homework: Self-assessment corner P.70-71 (Submit on Oct 13)
Test on Chapter 2: 29th Oct, 2015
Key terms test
1. Check Digit
2. Data source error
3. data validation
4. data verification
5. database management system (DBMS)
6. direct access
7. even parity bit
8. filter
9. key field
10. query
11. sequential access
12. transcription error
B1: Garbage in Garbage out
B2: hierarchy