Computer files can contain fixed length or variable length records.
Examples of fixed length fields are Gender or DOB.
Examples of variable length fields are Name, Address, E-Mail Address
Fixed length record has the same number of bytes/characters in each record and the same number of fields
Variable length record has different number of bytes/characters in each record or different number of fields.
Fixed length record is easier to program as it can be calculated as you know how much space will be required
Variable length record makes it difficult to calculate how much space will be required.
Fixed length records wastes storage space as fields have blank space
Variable length records saves storage space as there is no blank space
Fixed length records will truncate long fields
Variable length records avoids truncation as each field can extend to accommodate any number of characters
Fixed length records are quicker to process (read/write) by computer as start and end locations are known
Variable length are slower to process (read/write) by computer as start and end locations have to be calculated at read/write time
Exam Tip - Example of an extended WJEC answer worth 6 marks
The difference between fixed and variable length records is that a fixed length record has same number of bytes in each record but a variable length record has different number of bytes in each record. Fixed length records are easier to program as it can be calculated to know how much storage space will be required but a variable length record makes it difficult to calculate how much storage space will be required. Fixed length records are quicker to process (read/write) by computer as start and end locations are known but variable length records are slower to process (read/write) by computer as start and end locations have to be calculated at read/write time. Fixed length record wastes storage space as fields have blank space whereas variable length record saves storage space as no blank space.
5 - 6 marks Candidates give a clear, coherent answer fully discussing fixed and variable length records. The difference between them is described in detail.