Fixed length records | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A file where all the records are of the same length is said to have fixed length records. Some fields are always the same length (eg
Postcode is always 7 characters). Some fields may need to be
'padded out' so they are the correct length Advantage : Access is fast because the computer knows where each record starts. Eg If each record is 120 bytes long then
Disadvantage : Using Fixed length records, the records are usually larger and therefore need more storage space and are slower to transfer (load or save). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In the Example
...the field lengths may be..
Each record would be 46 bytes long. The first record of the example file would be stored as ...(each box represents one byte of storage)..
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||