Files [Computing] Computing
Serial Files Records are added (appended) to the end of the file as they occur. Computing
Sequential File The records are stored in sorted order of a key field. Computing
Random Access File Each record has a key field. A calculation is performed on the key field (hashing algorithm) which results in an address (hash address). The record is stored at the hash address. Computing
Example : A file of members of a chess club. Each member has a 4-digit membership number. This is the key field. Hashing algorithm : Subtract 1000 from the membership number. Member John Smith has Membership Number 1004. His record would be stored at record 4 in the file. Computing
Serial (sequential) Access Each record in a file is input until the required record is found. Computing
Random (direct) Access The hashing algorithm is performed on the keyfield of the required record, giving… …a hash address where the record can be found. Computing
Hashing algorithm : Subtract 1000 from the membership number. In the Chess Club example, where would the record of Sally Jones (membership number 1006) be found? Hashing algorithm : Subtract 1000 from the membership number. Record 6 Computing