Prev | Current Page 326 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"


An advantage of fixed-length record files is that the system can easily calculate exactly where information
exists. If the user requests the 3rd field from the 57th record, simple arithmetic will provide the exact location
of the information.
A problem with fixed-length record files is that often field values are naturally of varying length, and to
make the file a fixed-length record file, the designer must make each field big enough to accommodate the
largest value. Since most records do not need all the space, space will be wasted most of the time.
Another file type is the variable-length record file. In this case, each record consists of the same set of
fields, but the fields can be of varying length (including zero length). While a variable-length record file fits the
use of storage to the data, its format must provide the information about the size of each field in each record.
This wastes some space, and it adds an overhead during reading and writing.
A special type of file is an ???indexed-sequential file.??? Its special structure is designed to promote fast
searches of a large file. The records in the main file are sorted by the value of the ???key??? field. In addition, the
file system associates with the main file a much smaller file of pointers to records in the main file.


Pages:
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
agencja reklamowa poznaƄ meble drewniane kompresory Accept Koraliki