Вы находитесь на странице: 1из 25

USE OF ICT IN

DATA
MANAGEMENT

What is a database?
It is a collection of related data.
It consists of records and fields; each record
contains the same set of fields.
One field contains one piece of information.

Back to
Contents

Database
Management
System

Functions in a
Sequential File

Sequential Files

Hierarchical
Database
Management
Index Sequential and
System

Processing a
record
Performing
Functions

Network
Database
Management
System

Random Access File

Relational
Database
System
Back to
Contents

Database Management
System (DBMS)
This is a kind of software that is used to
manage database systems:
Structure of individual data files
Relationships between data items +

between data files


How data is searched (interrogated)
Properties of the database (queries,
updating or amendments)

Back to
Contents

Sequential Files
Records are stored one after the other in the
order they were added to the storage medium.
Storage Medium: Magnetic Tape
Two ways in which records can be arranged:
1. Have the records in an order using a key
field.
What is a key field?
Its is unique for every record. It is required to
ensure that you dont have any duplicates.

This type of type of sequential is


Back to
called
Contents

Sequential Files
2. Another ways is to arrange the records in no
particular order
This is type of sequential is called
unordered sequential.
Another name for an unordered file is serial
file.
There is only one way of accessing the data: by
going through each record one by one.

Back to
Contents

Sequential Files
Ordered file -- > data is put in order of a key field
(For example: customer ID)
Unordered file -- > as the name suggests as the
data in no particular order.
Disadvantages of using sequential files

Back to
Contents

Random vs. Sequential

Back to
Contents

Disadvantages of a
Sequential File
1. You can only add a new record at the end of
the file
2. If a record needs to be replaced it must be
the EXACT same length as the original
3. A record can only be updated if the data
item used to replace the existing data is the
same length as the original.
4. Processing of a sequential file is slower
compared to other files. How?
Back to
Contents

How do you process


records?

You need to read through each and every record


until you get the one you want.
Only recommended for applications where
most/all the records are to be processed at one
time.
For example: British Gas sends out bills to all
their customers. You receive a bill after every
three months. So a person who joins in January
will receive their bill in April along with all the
other people who also joined in January.
Back to
Contents

Functions in a Sequential
File
Adding records -- > easy

Amending + Deleting -- > not so easy.


If it is an unordered sequential file amending
and deleting are fairly difficult
If it is an ordered sequential file amending
and deleting are sort of easy. This is done with
the assistance of a transaction file.

What is a transaction file?


It contains the actions to be carried out
on the records.

Back to
Contents

Performing Functions in D:
Delete
an Ordered File
C:
The key field is used.

Change
Transaction File
A: Add
ID Tran Name
Gender
s.

Master File
I
D

Name

Mr Ahmed Male

Mr Ahmed Male

Mrs
Russell

Female

Mr Russell Male

Mr Royale

Male

Mr Royale

Male

Hafiz

Male

Gender

4 Mr ONeil Male
Computer reads the first
record from the
transaction and the
master file. If the ID
doesnt match (In this case
it does), the computer
writes it to the new
master file

5 A
New Master File
I
D

Name

Gender

Mr
Russell

Male

Mr ONeil

Male

Hafiz

Male

The next record


is then read
and the
transaction
Back tois
carried
out by
Contents

Indexed Sequential and


Random Access Files
These are stored in order
As opposed to the sequential files that
were stored on magnetic tape, index
sequential are stored on a disk, allowing
them to have direct access.
Each record has a fixed field length.
Having things ordered provides a
greater speed of access.
Back to
Contents

Indexed Sequential and


Random Access Files
Indexed sequential -- > records are in an order
(for example: by surname)
Index: pointer to where on the disk the record is stored .
The table may be from A-Z, the index can then point out
where all the As are, where all the Bs are, etc. it works
like the index of a book.

If you search for something starting with S. All the


records from A to R will be ignored. Then every record in
the S section is read one by one until what you get what
you need.

Back to
Contents

Indexed Sequential and


Random Access Files
Banks use sequential access systems in order
to process cheques. This will be very useful
especially in online banking.
Index sequential files are used with hybrid
batch processing systems- employee records.
This allows for direct access when an
individuals record needs to be seen.
Records held sequentially allowing serial
access when producing a payroll.
Back to
Contents

Indexed Sequential and


Random Access Files
Random Access -- > quickest form of
access.
Despite the position of the desired
record, it will take the same amount of
time to access it.
Each record has a key; the computer
looks up the key -- > goes to the
appropriate place on the disk to access it.
Back to
Contents

SEQUENTIAL FILES

INDEXED FILES

Sequential files are called as QSAM


files.

Indexed files are also called as VSAM


files.

Data is entered in entry sequential


order.

Data is entered in key sequential


order.

Data is not in sorted order.


Data is in sorted order based on key.
Delete is not applicable.

Delete is applicable

Access is slow.

Access is faster.

Key is not available.

Key is available. Key is user defined.


Key is part of a record.

Data is stored on tape/disk.

Data is stored on disk only.

Frequently used files.

Rarely used files.

Duplicate data is allowed.

Duplicate data is not allowed.

Back to
Contents

Hierarchical Database
Management Systems (DMS)
No longer used. Why?
One-way relationship problem!
A hierarchical DMS -- > family tree like
structure.
One mother can have many children, but the
children can have only one mother.
Windows system several users each
user will have several documents
Enabling fast access to data
Back to
Contents

Network Database
Management System (DMS)
Overcome the faults of the hierarchical DMS
Many organisations now use a distributed
database system.
Data is stored on computers that are then
linked by a LAN/WAN.
Data in the database is duplicated several
times, so it is unlikely to loose the data and
it also gives the users faster access times.
To a user it seems to be a single system

Back to
Contents

Network Database
Management System (DMS)
System caters for complex searches;

search is not necessarily done at the site


where the user is.
For example: something that is done in
Dukhan on our computers could be then
processed in Doha.

Back to
Contents

Network Database
Management System (DMS)
Another type of Network DB stored

on one device accessed from a number


of network locations.
Users access the database but dont
slow the system down.
For example: PNC (Police National
Computer) and DVLA (Driver and
Vehicle Licensing Authority)
Back to
Contents

Relational Database
Systems
What is a relational database?
It consists of separate tables that are all
related in some way. So this means that
each table needs to have a key field that
is a field in another table. So what?
The data from the initial table can then be
combined with data from another table
when you need to produce reports.
Back to
Contents

Relational
Database
Customer
DVD
Customer ID
SystemsDVD ID
Name:

Name of DVD:

Date of Birth:

Number of Copies:

Address:

Main Actor:

Telephone Number:

Customer ID

In this table the


Customer ID is the
Key Field

In this table the DVD ID is


the primary key. The
Customer ID is the foreign
key. These two tables are
linked by the Customer
ID.
Back to
Contents

Relational Database
Systems
Standard Programming Language dealing
with relational tables is called Structured
Query Language (SQL). What is it used for?
It is used for queries and producing reports.
Advantages of relational databases

Back to
Contents

Advantages of Relational
Databases
1. Data not repeated storage capacity not
wasted. Comparing this to a flat file
database, in which data is repeated.
2. Data retrieval is quicker. If the data is
repeated, hackers will have greater ease in
accessing the data. Relational databases
reduce this risk.
3. They also allow room for expansion
Back to
Contents

Вам также может понравиться