A fixed length record is one where the length of the fields in each record has been set to be a certain maximum number of characters long.
A set amount of storage space is set aside for each field. If the contents of a field don’t fill the space completely it is remains empty and is wasted.
The problems with fixed length records are:-
The advantage of fixed length records is that they make file processing much easier because the start and end of each record is always a fixed number of characters apart. This makes it much easier to locate both individual records and fields.
A variable length record is one where the length of a field can change to allow data of any size to fit.
A special marker (# in this example) indicates where each field ends.
The length of a field depends upon the data that is placed in it. Only the space needed for a field is ever used — so none is wasted.
The advantage of variable length records is that space is not wasted, only the space needed is ever used.
The main problem with variable length records is that it is much more difficult to locate the start and end of individual records and fields.
To separate variable length records each field has a special character to mark where it ends — called an ‘end-of-field marker’. When records need to be located the computer must count through the end-of-field markers to locate individual records and fields.