13.2 File Organisation and Access Flashcards
Serial File Organisation
a method of file organisation in which records of data are physically stored in a file, one after the other, in the order which they were added to the file.
Least efficient for a large number of files. No key field used / stored in chronological order.
Sequential File Organisation
a method of file organisation in which records of data are physically stored in a file, one after the other, in a given order.
Random File Organisation
a method of file organisation in which records are physically stored in file in any available position, the location of the file is found by using a hashing algorithm on the key field.
Most efficient for a very large number of records. Collisions can occur.
Serial File Organisation uses
Temporary files storing transactions
eg Gas/Electricity meter bills
Sequential File Organisation uses
Customer spending file w customer’s purchases
eg Customer 1, Customer 2, Customer 3
Sequential Access
Method that searches for records one after another from the start of the file until the required record is found. Used for sequential and serial files.
For serial file, sequential access, if a particular record is searched for, every record needs to be searched for until it is found or whole file has been searched. New records are appended to the end of the file.
For sequential files, every records needs to be searched until record found or key field greater than key field of record being searched.
Direct Access
Method that can physically find a record in a file without other records being physically read. Can be used on both sequential and random files. Specific records can be found more quickly than sequential access.
For sequential files, an index of all the key fields is kept and used to look up the address of the file location where a given record is stored.
For a random access file, a hashing algorithm is used on the key field to calculate the address of the file location where a given record is stored.
Hashing algorithm
A mathematical formula used to perform a calculation on the key field of the record. The result of the calculation gives the address where the record can be found.