Unit 5
Unit 5
Jawahar Nagar
Aura Of Excellence In Computer Education Kota (Rajasthan)
C, C++, DSA, VB, VB.Net, C#, ASP.Net, Java (Core & Adv.) Mobile No. : 9783001119
PHP+MySql, UNIX, LINUX, Oracle, PL/SQL, BCA, MCA
Unit V
File Organization: Physical And Logical
File organization refers to the relationship of the key of the record to the physical location of
that record in the computer file.
File organization may be either physical file or a logical file. A physical file is a physical unit,
such as magnetic tape or a disk.
A logical file on the other hand is a complete set of records for a specific application or purpose.
A logical file may occupy a part of physical file or may extend over more than one physical file.
The objectives of computer based file organization:
· Ease of file creation and maintenance
· Efficient means of storing and retrieving information.
The various file organization methods are:
· Sequential access.
· Direct or random access.
· Index sequential access.
The selection of a particular method depends on:
· Type of application.
· Method of processing.
· Size of the file.
· File inquiry capabilities.
· File volatility.
· The response time.
1. Sequential access method: Here the records are arranged in the ascending or descending
order or chronological order of a key field which may be numeric or both. Since the records are
ordered by a key field, there is no storage location identification. It is used in applications like
payroll management where the file is to be processed in entirety, i.e. each record is processed.
Here, to have an access to a particular record, each record must be examined until we get the
desired record.
Sequential files are normally created and stored on magnetic tape using batch processing
method.
Advantages:
· Simple to understand.
· Easy to maintain and organize
The type of file organization is suitable for both batch processing and online processing.
Here, the records are organized in sequence foe efficient processing of large batch jobs but an
index is also used to speed up access to the records.
Indexing permit access to selected records without searching the entire file.
Advantages:
· Permits efficient and economic use of sequential processing technique when the activity rate
is high.
· Permits quick access to records, in a relatively efficient way when this activity is a fraction of
the work load.
Disadvantages:
· Slow retrieval, when compared to other methods.
· Does not use the storage space efficiently.
· Hardware and software used are relatively expensive.