Lecture 4.Pptx 2
Lecture 4.Pptx 2
Facilitator : Dr.S.Saraswathi
Files
Introduction
• A file is a container in a computer system for storing information.
• There are different types of files such as text files, data files,
directory files, binary and graphic files
employeenam
employeeno occupation gender location salary
e
7369 SMITH CLERK F Production Unit 800.00
• Certain fields in the record are key fields used to identify the records and
called as unique key.
In real time retrieval, the response time of any query should be minimal.
There are two files in a batched update : Master and Transaction File
• Master File represents the file status after the previous update.
All the required functions can be carried out efficiently by maintaining the
master file on a tape.
• The records in the file are ordered by a key field.
• Request for retrieval and update are batched on to a transaction
tape.
Sequential Order
• The records in the transactions are sorted using the sorted file and
master files are examined when updates are processed.
• Time required for the process is O(n + m log m) where n and m are
the records in master and transaction files.
• Sequential file search starts from the beginning of the file and the
records can be added at the end of the file.