Home Chemistry Physics HTML
Night More

Revise Now

GCE Subjects

Physics Chemistry CS Accounting

Coding Lessons

Learn HTML Learn SEO

More

What do you want
to do?

Contact us Support




more topic chapters

File Organisations

There are 3 types of files:

  • Serial Files
  • These type of files has no ordering of data within the files and so data is just appended at the end of the file. The only order is the time order it was entered in so it is very useful for recording measurements of a sensor or recording bank transactions of a person

    These are never used when data is required to be searched and read from

  • Sequential Files
  • These type of files has data ordered using a specific order by using a specific unique key. When searching data from this file, each line must be read line by line and only the unique key is compared or else it will be very slow

    This is used in Banks to record customer details and the balance called the master file

    If there is a new record or line of data to be added it must be put into the specific order using its unique key

  • Random Access or Direct Access Files
  • These files have direct access to a specific line or record of data in the file. There is no need for a sequential search for the record line by line

    How this works is that the data itself has a unique value in which can be processed by a hashing function to produce a hash address. which is used to store the data

    Random files are used for batch processing and for validating usernames and passwords of a person as it is faster and has approximately the same access time for any size file

    The Hashing Function will be discussed later...

    What File Type to Use?

    When you don't require to store data in order but only using time order, or if there is no requirement for data to be accessed quickly, then we can use serial

    When you need to order data in order but the file is sometimes used to access data then we use sequential

    If data needs to be accessed from a large file quickly then we use random files


    Recommended

    These are things you might like. Clicking these ads can help us improve our free services in the future...



    Quick Recap
    Check your Knowledge with a Quick Recap

    Try out