NSS-ICT‎ > ‎Unit A‎ > ‎

Chapter 02

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.

Data Validation

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
  Data bitsParity bit 
 D1 00101010
 D2 00101100
 D5 11001100
Which data has errors ?

Q2. Error correction using even parity
  Data bitsParity bit 
 D10 0101010
 D20 0 101100
 D31 0 101010
 D41 0 111010 
 D51 1 001100
 parity 1 1 111010 
Only 1 bit has error. Identify the bit and correct it.

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 =MOD(K11,11)
 D2 =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
 Database server
(It can support large number of user)
 MySQL server, Microsoft SQL server
 Small Office
 (a small number of user)
 FoxPro / Visual FoxPro 
 (cease support in 2015) 
 personal use Microsoft Access

Practical 1 (Refer to P.55 - 57)
Try out using SQL
  1. Open MySQL control center (Program - Database Management - SQL - MySQL control Center)
  2. Type SQL commands to test different kinds of basics functions of SQL.
  3. 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 

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)

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

T. Chan,
Sep 14, 2015, 12:21 AM
T. Chan,
Oct 2, 2013, 7:53 AM