Slides in this set
Suppose a school stores information about its students
on record cards. Each student has their own card; this
is their record.
The individual pieces of information recorded on each
card, such as name and date of birth, are called fields.…read more
Files, records and fields
Information in computer-based filing systems is
stored in data files.
A file is a collection of related records.
Related records means that each record in a file will
contain the same sort of information as all the other
A record must have at least one field.
A field contains one individual item of data.…read more
Fixed and variable length records
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.…read more
The problems with fixed length records are:-
Fields very rarely contains the maximum number of
characters allowed which wastes space.
Values sometimes can't be entered because they are too
large to fit inside the allowed space in a field.
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.…read more
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.…read more