File Organisation Flashcards
File
A file is collection of related records
Record
A record is a collection of related fields
Variable length field
Variable length field has different number of bytes in each record. Variable length field makes it difficult to calculate how much storage space will be required
Variable length field are slower to process by computer as start and end locations have to be calculated at read/write time
Variable length field saves storage space as no blank space
E.g. - Name, Address, email address.
Fixed length field
Fixed length field has the same number of bytes in each record. Fixed length field makes it easier to calculate how much storage space will be required. Fixed length records are quicker to process by computer as start and end locations are known.
E.g. - Gender, Date Of Birth.
Serial File
Data is stored in the order in which it was entered. No order to the data is maintained. Useful for storing transactional and initialisation files. To add to a serial file the new record is appended to the end of the file.
Sequential Files
Data is stored in the order of a key filed. Order is maintained when new records are added. Useful for storing master files. To add to a sequential file, a new file is made by copying the old file until an insertion is required then inserting the new record and copying the rest of the file. The old file is then deleted.
Linear search
An algorithm that finds a value in a list by checking each item in order until a match is found
Binary search
An algorithm that works by repeatedly dividing in half the portion of the list that could contain the item, until you’ve narrowed down the possible locations to just one.
Direct access
storing data in a file where any record can be accessed directly, without having to read through the records that come before it
Overflow
overflow describes a situation where a disk block is full
and a new record requires somewhere to be stored. the new record will be stored in this overflow area.
Indexed sequential
storing data where records are physically arranged in a sequential order, but an additional index is maintained to allow for quick random access to individual records based on a key value