0% found this document useful (0 votes)
17 views5 pages

File Organization

Uploaded by

anyangwagilpeter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views5 pages

File Organization

Uploaded by

anyangwagilpeter
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

FILE ORGANIZATION

DEFINITION;
File organization is the efficient retrieval, storage, and
management of files within a computer system.
Simply it is the way data records are stored in a file.

OBJECTIVES OF FILE ORGANIZATION;


 To perform delete, update transactions on the records
found on the file
 To reduce data redundancy

TYPES OF FILE ORGANIZATION;


Under file organization 4 types will be
mentioned below;
 SEQUENCIAL FILE ORGANIZATION;
- It is one of the easiest method for
organizing data or records
- Files are stored one after another in a
sequencial manner
- Records are stored in ascending or
descending order depending on the key
field.
- Searching starts at the beginning of the file
and records can be added and the end of
the file.
R1 R2 -------------------------- R4 R5

Start of the End of file


file
INSERTING RECORDS IN SEQUENCIAL FILES;
There are two ways to insert a record in a file
 Insertion is done at the end of the record

R1 R3 -------------------------- R4 R5

R2

R2 will be inserted at the end of the file sequencially


 INSERTING BY SORTING;
Taking from example above to insert R2 it is done at the end of the file
but the latter undergoes a sort that is a comparism with all the other
records to well position that record hence if from example above R2 is
inserted in the file the positioning of R2 is going to be next behind R1
because when inserted at the end it is compared with R5 and R4 and
conclude smaller than those so brought closer to the start of the file

ADVANTAGES OF SEQUENCIAL FILE ORGANIZATION;


-It is simple in design
- It requires no much effort to store the data
- Fast an efficient method for huge amounts of data
- Files can easily be stored in magnetic tapes i.e cheaper storage
mechanism
DISADVANTAGES;
-Time consuming process
- It has high data redundancy
- Random searching is not possible but only sequencial search
- Sorted file method is inefficient it takes more time and space
APPLICATION OF SEQUENCIAL FILE ORGANIZATION
-Used in grade calculation of students
- Used for report generation or statistical calculations.

 INDEX FILE ORGANIZATION;


- Records are stored using primary keys
- Index value is generated for each key and mapped with the record
- Index contains address of record in the file
- Data can be accessed sequencially or randomly using the index.
- Index is stored into a file and read into a memory when file is opened.
- Retrieval is done based on the index value i.e the address of the data
block is fetched and the record is retrieved from the memory
- file contains records for data and those for indexes
ADVANTAGES
-Can be accessed both sequentially and randomly i.e the records
- Access record very fast if index table is properly organized
- Searching records in huge data bases is quick and fast.
- Records can be inserted in the middle of files
- It provides quick access for sequential and direct processing
- Reduces degree of sequential search
- Has less time complexity compared to the sequential file organization
DISADVANTAGES
-Requires unique keys who are in periodic organization
- When new records are inserted file has to be reconstructed to
maintain the particular sequence of the records
APPLICATION
-Used in storing Students records
- Index of online books
 DIRECT FILE ORGANISATION
Also known as the Hashed file organization
-Can be stored in DASD (direct access storage devices) e.g hard disk
- Records are been placed randomly unlike the sequential method.
- Record do not need to follow a sequence because they are updated
directly and rewritten back in the same
- Mostly for immediate access to large amount of information or large
databases.
- The hash file uses hash techniques (mapping key to address)
KEY A ADDRESS

ADVANTAGES;
-Mostly used on online transactions processing systems
-Sorting is not required
-Desired record is directly accessed immediately
- It update several files quickly
- Has better control over record allocation
DISADVANTAGES
-Provides no backup facility
- expensive software and hardware are needed
- File update is more difficult compared to sequential method.
- Less efficient use of storage space
- Data may be erased or loosed unless precautions are taken.

You might also like