FILE ORGANIZATION
TYPES OF FILE ORGANIZATION Serial Sequential Indexed Sequential Direct Access /Random Access
Serial File Organization A collection of records No particular sequence Cannot be used as master  Used as temporary transaction file Records stored in the order received
Sequential File Organization A collection of records Stored in key sequence Adding/deleting record requires making new file Used as master files
Sequential file
Advantages Simple file design Very efficient when most of the records must be processed e.g. Payroll Very efficient if the data has a natural order Can be stored on inexpensive devices like magnetic tape.
Disadvantages Entire file must be processed even if a single record is to be searched. Transactions have to be sorted before processing Overall processing is slow
Direct (Random) File Organization Records are read directly from or written on to the file. The records are stored at known address. Address is calculated by applying a mathematical function to the key field.
Direct (Random) File Organization A random file would have to be stored on a  direct access  backing storage medium e.g. magnetic disc, CD, DVD Example :  Any information retrieval system. Eg Train timetable system.
Advantages Any record can be directly accessed. Speed of record processing is very fast. Up-to-date file because of online updating. Concurrent processing is possible.
Disadvantages More complex than sequential Does not fully use memory locations More security and backup problems
Indexed sequential file Each record of a file has a  key field  which uniquely identifies that record. An  index  consists of  keys  and  addresses . An  indexed sequential file  is a  sequential  file (i.e. sorted into order of a key field) which has an  index . A  full index  to a file is one in which there is an entry for every record.
Indexed sequential file
Indexed sequential file Indexed sequential files  are important for applications where data needs to be accessed..... sequentially   randomly  using the index.
Indexed sequential file An indexed sequential file can only be stored on a random access device e.g. magnetic disc, CD.
Advantages Provides flexibility for users who need both type of accesses with the same file Faster than sequential
Disadvantages Extra storage space for the index is required
Batch Processing Batch processing is updating master files periodically to reflect all transactions that occurred during a given time period. The master file is updated at set times or whenever a manageable number of transactions are gathered. Transaction data can either be entered as a batch or as each transaction occurs.
Batch Processing Master file Group source documents into batches.
On-line Batch Processing Master file Enter transactions into system as they occur.
On-line, Real-Time Processing In on-line, real-time processing, the computer captures data electronically,... edits it for accuracy and completeness, and... immediately processes it. The computer also processes information requests from users.
On-line, Real-Time Processing Master file Enter transactions into system as they occur.
Advantages of Each Method The main advantage of batch processing was efficiency in processing. On-line data entry is more accurate than periodic batch input because the system can refuse incomplete of erroneous entries. Real-time processing ensures that the information in master files is always current.

File organization

  • 1.
  • 2.
    TYPES OF FILEORGANIZATION Serial Sequential Indexed Sequential Direct Access /Random Access
  • 3.
    Serial File OrganizationA collection of records No particular sequence Cannot be used as master Used as temporary transaction file Records stored in the order received
  • 4.
    Sequential File OrganizationA collection of records Stored in key sequence Adding/deleting record requires making new file Used as master files
  • 5.
  • 6.
    Advantages Simple filedesign Very efficient when most of the records must be processed e.g. Payroll Very efficient if the data has a natural order Can be stored on inexpensive devices like magnetic tape.
  • 7.
    Disadvantages Entire filemust be processed even if a single record is to be searched. Transactions have to be sorted before processing Overall processing is slow
  • 8.
    Direct (Random) FileOrganization Records are read directly from or written on to the file. The records are stored at known address. Address is calculated by applying a mathematical function to the key field.
  • 9.
    Direct (Random) FileOrganization A random file would have to be stored on a direct access backing storage medium e.g. magnetic disc, CD, DVD Example : Any information retrieval system. Eg Train timetable system.
  • 10.
    Advantages Any recordcan be directly accessed. Speed of record processing is very fast. Up-to-date file because of online updating. Concurrent processing is possible.
  • 11.
    Disadvantages More complexthan sequential Does not fully use memory locations More security and backup problems
  • 12.
    Indexed sequential fileEach record of a file has a key field which uniquely identifies that record. An index consists of keys and addresses . An indexed sequential file is a sequential file (i.e. sorted into order of a key field) which has an index . A full index to a file is one in which there is an entry for every record.
  • 13.
  • 14.
    Indexed sequential fileIndexed sequential files are important for applications where data needs to be accessed..... sequentially randomly using the index.
  • 15.
    Indexed sequential fileAn indexed sequential file can only be stored on a random access device e.g. magnetic disc, CD.
  • 16.
    Advantages Provides flexibilityfor users who need both type of accesses with the same file Faster than sequential
  • 17.
    Disadvantages Extra storagespace for the index is required
  • 18.
    Batch Processing Batchprocessing is updating master files periodically to reflect all transactions that occurred during a given time period. The master file is updated at set times or whenever a manageable number of transactions are gathered. Transaction data can either be entered as a batch or as each transaction occurs.
  • 19.
    Batch Processing Masterfile Group source documents into batches.
  • 20.
    On-line Batch ProcessingMaster file Enter transactions into system as they occur.
  • 21.
    On-line, Real-Time ProcessingIn on-line, real-time processing, the computer captures data electronically,... edits it for accuracy and completeness, and... immediately processes it. The computer also processes information requests from users.
  • 22.
    On-line, Real-Time ProcessingMaster file Enter transactions into system as they occur.
  • 23.
    Advantages of EachMethod The main advantage of batch processing was efficiency in processing. On-line data entry is more accurate than periodic batch input because the system can refuse incomplete of erroneous entries. Real-time processing ensures that the information in master files is always current.