The arrangement of fixed-length and variable-length


The arrangement of fixed-length and variable-length

Field Lengths in Records

There are two ways in which record lengths are specified in the traditional file management system. The fields have a fixed length or they have variable lengths.

In a fixed-length field, the length of the field is fixed by the file management system. For example, if the fire For example, if the field length for Name has been fixed as of 8 characters, then the field always takes up 8 characters storage media.) This length of the field is specified in the application program. If a field value takes less space, the remaining field space remains empty
When all the fields in a record have fixed lengths, then the size of
the record itself will have a fixed length. For example,

The variable-length field

A variable-length field takes up as much space as the data requires. Thus, if a person's first name is Nisar, it takes a storage space of five characters. Similarly, if a person's name is Marriam, the field will consist of seven characters in this method, storage space is not wasted

In a variable-length structure, a special character is used to separate fields.

To find a particular record, the computer reads all the fields while counting the separators. It uses the separators' count to reach a specified record.

Post a Comment

0 Comments