Chapter 11 File Management
Chapter 11 File Management
Files
Used for input to a program
Output of application saved in a file for
long-term storage
Terms Used with Files
Field
basic element of data
contains a single value
characterized by its length and data type
Record
collection of related fields
treated as a unit
Example: employee record
Terms Used with Files
File
collection of similar records
treated as a single entity
have unique file names
may restrict access
Database
collection of related data
relationships exist among elements
File organization
A file is organized to ensure that records are
available for processing. As mentioned earlier, it
should be designed in line with the activity and
volatility of the information and the nature of the
storage media and devices. Other considerations are:
Cost of file media,
Inquiry requirements, and
File privacy, integrity, security and confidentiality.
There are four methods of organizing files:
Sequential
Indexed sequential
Inverted list
Direct access
Sequential Organization
For e.g. f1 key stands for help and it brings out all possible help to
the user.
Direct Access Organization
In direct access file organization, records are placed randomly throughout the file.
Records need not be in sequence because they are updated directly and rewritten
back in the same location.
New records are added at the end of the file or inserted in specific locations based
on software commands. Records are accessed by addresses that specify their disk
locations.
An address is required for locating a record, for linking records or for establishing
relationships. Addresses are of two types: absolute or relative. An absolute address
represents the physical location of the record. It is usually stated in the format of
sector/track/record number. For example, 3/14/6 means, go to sector 3, track 14
of that sector and the sixth record of the track.