This document discusses file organization and different types of file organization structures. It defines file organization as the physical arrangement of records on a storage device. The main types discussed are sequential, indexed sequential, and direct access/random access files. Sequential files store records one after the other in order. Indexed sequential files allow both sequential and random access through the use of an index. Direct access files allow direct reading or writing of records based on their address. The document also discusses factors to consider when choosing a file organization method, such as the frequency of updates and nature of access needed.
3. OBJECTIVES
By the end of this lesson, the students should
be able to;
• Define file organization
• State the types of file organization
• Sate the efficiency of file organization
• Sate the significance of choosing of an
appropriate file organization for your data
4. FILE
• A file is a collection of data stored on
a storage media, that is treated as a
single unit on a peripheral device.
5. Types of Data Files
• There are numerous types of files used for
storing data needed for processing, reference
or back up.
• The main common types of processing files
include
Master File
Transaction (movement or activity) file
Reference file
Backup file
Report file
6. Types of Data Files
• Master File
It contains record of permanent data types.
They are created when you install your
business.
• Transaction (movement or activity) file
A transaction file is used to hold data during
transaction processing. The file is later used
to update the master file and audit daily,
weekly or monthly transactions.
7. Types of Data Files
• Reference file
A reference file is mainly used for reference or look-
up purposes. Look-up information is that
information that is stored in a separate file but is
required during processing.
• Backup file
A backup files is used to hold copies (backups) of
data or information from the computers fixed
storage (hard disk
8. STORAGE DEVICES
CHARACTERISTICS
• The major storage media
are;
• Tape (Magnetic technology)
• Hard Disk (Optical Technology)
• Solid State Drive (Flash memory/Solid
state memory)
9.
10.
11.
12. TERMINOLOGIES
• Seek Time is defined as the time required by the
read/write head to move from one track to another.
• Rotational latency (sometimes called rotational
delay or just latency) is the delay waiting for the
rotation of the disk to bring the required disk sector
under the read-write head.
• Access time is total time it takes a computer to
request data, and then that request to be met
• The access time, therefore, depends on the seek
time and the latency time.
13. TERMINOLOGIES
• Fixed-length records - all the records are exactly
the same length. (read the note for more)
• Variable-length records - the length of each record
varies.
14. TYPES OF FILE ORGANIZATION
FILE ORGANIZATION
File organization refers to the way records
are physically arranged on a storage device
The main types of file organization are;
Sequential
Indexed Sequential
Direct Access /Random
Access/Hash/Relative
15. TYPES OF FILE ORGANIZATION
Other types are;
• Heap File Organization
• Cluster File Organization
• B+ Tree File Organization
16. Sequential File Organization
Here each file/records are stored one after the
other in a sequential manner, that is, in the
order in which they are created. This can be
achieved in two ways:
pile or serial file method
sorted file method
17. Sequential File Organization
Pile or Serial method
Records are stored one after the other as they
are inserted into the tables, they are unordered.
When a new record is inserted, it is placed at the
end of the file. In the case of any modification or
deletion of record, the record will be searched in
the memory blocks. Once it is found, it will be
marked for deleting
Cannot be used as master
Used as temporary transaction file
18.
19. Sequential File Organization
Sorted method
A collection of records
Stored in key sequence
Adding/deleting record requires making new
file
Used as master files
20.
21. Advantages
Simple file design
Very efficient when most of the records must
be processed e.g. Payroll
Very efficient if the data has a natural order
Can be stored on inexpensive devices like
magnetic tape.
22. Disadvantages
For the sorted method, entire file must be
processed even if a single record is to be
searched, hence time consuming.
Overall processing is slow
Random enquiries not possible to handle
23. Examples of media in Sequential
orgnization
Tape
Video Cassettes
Music cassettes
24. Direct (Random) File Organization
Records are read directly from or written on
to the file.
The records are stored at known address.
Address is calculated by applying a
mathematical function (hashing
function) to the key field.
Records can be accessed both
randomly and sequentialy
25. Direct (Random) File Organization
A random file would have to be stored on a
direct access backing storage medium e.g.
magnetic disc, CD, DVD, flash drive, Blu-
ray disk.
Example : Any information retrieval system.
Eg Train timetable system.
26. Advantages
Any record can be directly accessed.
Speed of record processing is very fast.
Up-to-date file because of online updating.
Concurrent processing is possible.
27. Disadvantages
More complex than sequential
Does not fully use memory locations
More security and backup problems
(backup facility needed)
28. Indexed sequential file
Each record of a file has a key field which
uniquely identifies that record.
An index consists of keys and addresses.
An indexed sequential file is a sequential
file (i.e. sorted into order of a key field) which
has an index.
A full index to a file is one in which there is
an entry for every record.
30. Indexed sequential file
Indexed sequential files are important for
applications where data needs to be
accessed.....
–
–
sequentially
randomly using the index.
31. Indexed sequential file
An indexed sequential file can only be stored
on a random access device
e.g. magnetic disc, CD.
34. Factors to consider when choosing
a file organization method.
• Frequency of update: A file that needs to be
updated every now and then needs an
organization method that will allow easy retrieval
of information and ease of updating, example of
such a file is the transaction file.
• File activity: Different files have different
activities, example a sort file is used to sort data
in sequential order and therefore sequential
method would be appropriate for such a file.
35. Factors to consider when choosing
a file organization method.
• File access method: Definitely different files
have different methods of being accessed,
example a reference file is accessed using
random method for easy retrieval of data.
• Nature of the system: Files that are used in a
particular system will depend on the nature of
the system i.e the suitable organization method
for that particular system.
36. Factors to consider when choosing
a file organization method.
• Master file medium: The master file is the main
file for keeping permanent updates of records
from transaction files and other sources, the
medium by which it is updated will determine
the organization method to be used.