Saturday, 5 November 2011

FILE ORGANIZATION

DIFFERENT FILE ORGANIZATION

File organization basically refers to the logical arrangement of data, which can be organized in a system of records with co-relation between the fields /columns, in a file system.It refers to the way records are physically arranged on a storage device.

TYPES of file organzation:
  1. Heap(unordered) file organization :  the record can be stored where there is storage space available.There  is no fixed order for records.
  2. Sorted file organization: the records are stored in sequential order according to the search key of record. 
    -Sequential(SAM)
    -Line Sequential(LSAM)
    -Indexed Sequential(ISAM)

3. Hashed or Direct : with hashed access or direct a portion of disk space is reserved. Records are placed randomly throughout the file.records are accessed by address that specify their disc location.It has an excellent search retrieval performance, but care must be taken to maintain the indexes.


WHAT IS A FILE ?
A file is a collection of bytes stored in secondary storage device, which is generally a disk of some kind.
The collection of bytes may be interpreted, for example , as characters , words , lines , lines , paragraphs and pages from a textual documents ; fields and records belonging to a data base.
It is simply a machine deciphered storage media, where programs and data are stored for machine storage.



METHODS OF ORGANIZING FILES

1. Sequential Organization : a sequential file contains records organised in the order they were entered.The order of records is fixed.The records are stored and sorted in physical ,contiguous blocks within each block the records are in sequence.
Records in these files can be read or written sequentially.Once stored in the file , the record cant be edited i.e cant be made shorter , longer or deleted. However the record can be updated if the length does not change.
New records will appear at the end of the file.

No comments:

Post a Comment