Databases and Processing Modes

Download Report

Transcript Databases and Processing Modes

Databases and Processing
Modes
Fundamental Data Storage
Concepts and Definitions
What is an entity?
An entity is something about which
information is stored.
What are some examples of entities?
– employees
– inventory items
– customers
Fundamental Data Storage
Concepts and Definitions
What are attributes?
Each entity has attributes, or
characteristics of interest, which need to
be stored.
What are some examples?
– employee pay rates
– customer addresses
Fundamental Data Storage
Concepts and Definitions
Computers store data by organizing
smaller units of data into large, more
meaningful ones.
A field is the smallest element of data
storage.
A number of fields are grouped together to
form a record, which is a collection of data
values that describe specific attributes of
one entity.
Fundamental Data Storage
Concepts and Definitions
Related records are grouped together to
form a file.
What is an example of a file?
– the accounts receivable file
Files containing related data are combined
to form a data base.
Fundamental Data Storage
Concepts and Definitions
Data base
File
Record
Field
Fundamental Data Storage
Concepts and Definitions
Accounts Receivable File
Attributes
Customer Customer
Credit
number name Address limit Balance
301
ABC Co. Box 5 1,000 400
555
XYZ Co. Box 9 6,000 2,000
2 Entities
2 Records
Individual fields
Data
values
Types of Files
Two basic types of files are used to store
data.
1 The master file, which is conceptually similar
to a ledger in a manual system.
2 The transaction file, which is conceptually
similar to a journal in a manual system.
File Access and Organization
All computer systems must have some
formalized means of organizing data so
that it can be accessed easily and
efficiently.
1 9 8 7
1 9 8 6
1 9 8 5
1 9 8 4
1 9 8 3
1 9 8 2
Accessing Individual Records
Records are typically updated, stored, and
retrieved using an identifier called a
primary key. The primary key must be
unique for each entity.
What are some examples of the
appropriate primary key for a record?
– customer number for the customer file
– invoice number for the invoice file
Accessing Individual Records
A secondary key is another field used to
identify a record.
Secondary keys do not uniquely identify
individual records, but identify a group of
records.
What are some examples of secondary
keys?
– invoice due date
– zip code
File Organization
File organization refers to the way data are
stored on the physical storage media.
There are three basic ways that files are
organized.
1 Sequential access files
2 Indexed sequential access method (ISAM) files
3 Direct access files
File Organization
Sequential access files store records in
order according to their primary key (e.g.,
customer numbers from 00001 to 99999).
Indexed sequential access method (ISAM)
files store records in sequential order, but
also have an index that links primary keys
with their physical addresses.
File Organization
Direct access files store records in no
particular order.
A mathematical algorithm is applied to the
primary key to determine the physical
address at which to store that record.
Data Processing
The most common data processing activity
is data maintenance.
Data maintenance is the periodic
processing of transactions to update
stored data.
What are some commonly used types of
data maintenance?
Data Processing
Additions insert new records into a master
file.
Deletions remove records from a master
file.
Updates revise current balances in master
files.
Changes modify the data values of other
fields in master files.
Batch Processing
Batch processing is updating master files
periodically to reflect all transactions that
occurred during a given time period.
The master file is updated at set times or
whenever a manageable number of
transactions are gathered.
Transaction data can either be entered as
a batch or as each transaction occurs.
Batch Processing
Group source documents into batches.
Master
file
On-line Batch Processing
Enter transactions into system as they occur.
Master
file
On-line, Real-Time Processing
In on-line, real-time processing, the
computer captures data electronically,...
– edits it for accuracy and completeness, and...
– immediately processes it.
The computer also processes information
requests from users.
On-line, Real-Time Processing
Enter transactions into system as they occur.
Master
file
Advantages of Each Method
The main advantage of batch processing
was efficiency in processing.
On-line data entry is more accurate than
periodic batch input because the system
can refuse incomplete of erroneous
entries.
Real-time processing ensures that the
information in master files is always
current.