Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 2 : Data organization and data control (2.2 Data Control (Data…
Chapter 2 :
Data organization and data control
2.1 Data input
& sources of errors
Types of errors
transcription error
e.g. tlmshk is inputted as timshk
transposition error
e.g. 61 is inputted as 16
data source error
Garbage-in-garbage-out (GIGO)
:
erroneous data produces inaccurate information
2.2 Data Control
Data validation
Purpose
:
comparing data with a set of rules or values
make sure the data is reasonable & valid
Types of
validation techniques
field length check
ensure data has the correct no. of characters / digit
e.g. phone no. in hk must have 8 digits
range check
ensure data value is within a pre-determined range
e.g mark of a test should range from 0-100
field presence check
ensure all necessary fields are present
e.g. students no. must be included in the student record
fixed values check
ensure data conforms to be one of the value in pre-defined list
e.g gender of a student must be either 'male' / 'female'
check digit
check whether a number is valid
e.g. ISBN & HKID cards numbers
format check
ensure the form of data follows some known patterns
e.g. email address must be a combination of a user name & a domain name with '@ ' in between
data verification
:
a control used to check whether inputted data matches in source document
common methods for
data validation
input data twice
:
check the second entry
against the first one
double data entry
:
the computer compares the 2 files and reports any discrepancies between them
2.3 Data Hierarchy
Different levels of database hierarchy
record
contains information of specific entity
collection of related fields
e.g.
table
collection of related records with identical record structures
contains the information of all entities stored in specific record format
e.g.
field
smallest unit
represent a specific fact of a record
e.g. telephone no. etc.
database
collection of related table
may link records from different tables dynamically with one or more key fields
e.g.
2.4 Database Management System (DBMS)
Basic functions of DBMS
create table
create new table and specify the record structure
create a table "students" with fields "name", "ID", and "age"
modify table
change the structure of existing table
remove the field "age" from table "student"
delete table
remove a table from a database
remove table "student"
add a new record
create new record
delete existing records
remove unwanted records
issue a deleted command with a condition statement
modify existing records
change the field values of selected records
issue an update command with condition statement
browse records
display all or part of records of a table in a window
allowed to add, modify or delete records in the browse window
Essential features for database management
filter
specify a filtering condition
unmatched records are hidden temporarily until the filter constraint is released
sort
change the order of records
usually saved in new table
index
contain number of index keys
small relative to the referred table
data entry forms
interfaces for adding/ modifying records
provide a user-friendly environment for data entry
perform data validation
e.g. range check and type check of tests marks
perform data validation
e.g. range check & type check of tests marks
perform data verification
e.g. double data entry of renewal password
simplify data entry with features e.g. pull down menu, check box and list box
modify related records from two / more tables in one form
query forms
extract and display records which match the specified condition
can be stored and reusable
able to show data from two/ more tables & display calculated results using the extracted records
able to display calculated results using the extracted records
reports
can be stored and reusable
display results on the computer screen / produce hardcopies with a printer in the defined format
able to display data & calculated results from two/ more tables
able to print results in specific location, styles & formats accurately
2.5 File access modes
data base
records
sequential (順序)
access mode
e.g. magnetic tape
data records accessed sequentially
seek time long & unpredictable
direct access mode
data records accessed directly
seek time much shorter & predictable
e.g. hard disk
(most essential secondary storage device)