Data BASE (Collection of Files) : File Structure
Data BASE (Collection of Files) : File Structure
(Data Set)
File Structure
Types of Computer Files:
1. Master File
2. Transaction File
Data BASE 3. Transfer File
(Collection of Files) 4. Work File
5. Output file
6. Dump File
Files
(Collection of Logical Records)
Records (Tuple)
(Logical record )
Byte
(smallest addressable unit)
Master file:
A file which is a major source of reasonably stable information about entities is called a master file.
When records are added or deleted from a master file or when individual fields of records are
changed the master file is said to be updated.
Ex:In payroll processing the file which contains records of all employees is called master file.
Transaction file:
For example in payroll system every month each employees record is retrieved from the master file
and deductions of an employee are found by retrieving the corresponding transaction record of
monthly deductions from transaction file and the employee pay-slip is generated.
If a transaction record requires some changes in the master record the change is made and the
master record is written back.
Batch Processing in sequential file
Top half disk
(master file) Write back updated file
read
Transfer File
• This type of file carries data from one processing stage to another.
• Ex: The transaction file may be input to a sorting process, the output file of sorted records constitutes a transfer
file for input into the next process –i.e. the updating of master file.
Output File
• This contains information usually extracted from one or more master files for output from the system.
• It may be in printed form for dispatch to customers or on magnetic medium as input to another process.
• Ex: Invoices sent to customers.
• Weekly sales summaries as an input to monthly accounting process.
Dump file
• This is a copy of computer held data at a particular point in time. Also called as Backup file.
• This may be a complete copy of master file to be retained to help recovery in the event of a possible future
corruption of the master file.
• It can be a part of a program in which a possible fault is being investigated.
Archival File
• This is for long term storage of information about the organization’s business.
• Library file: Refers to the file containing application programs, utility programs, system software etc.
File Design Consideration Factors
Operational purpose: Rapid –response systems dictate direct-access method of file processing. For daily, weekly,
monthly needs where file activity is high and there is no immediate need of information the sequential orgn will be
effective.
Hardware : The availability of hardware decides the choice of media for the files.
Method of Access : If the proposed system systems require real-time operation or on-line enquiry then direct
access will be essential. Even if direct access is not a prerequisite the use of direct access media may be
desirable if this reduce the sorting time ,enable the file to be split into smaller files or significantly reduce the
processing time.
File Size: Small files can be kept in disc to improve availability .Very large files can be kept on tapes because the
raw cost of the tape is 1/10 th that of disc .
Output Requirements: Output file can be kept on disc. This permits greater versatility of processing selective
requirements.
Input Requirements: A transaction file is normally be subjected to validation, control and sorting. Detailed analysis
of requirements decide the storage medium.
File Activity:
a) The frequency of reading and updating of file.
b) The percentage of file required during the run
c) Will it be used by more than one program ? All these
issues decides the file design.
Speed of processing:
a) Data transfer time: (Time necessary to transfer sector between the disk and the memory buffer)
b) Latency time( Time spent for waiting the target sector to appear under the read/write heads) and
seek time( Time necessary for read/write heads to travel to the target track) on disk.
c) Stop /start time of tape
Cost : Tape is cheaper for storing large files. Tapes can be posted (Transporting) easily than disks which are
bulky and heavy.