Sunday, October 11, 2009

Record; Record Structures, Representation in Memory and Record with Variable Lengths

Record: A record is typically is used when a data file is organized into a table structure. In such organization of data, a record belongs to a hierarchy of fields, records and files. We can define record as a structured data type made up of a finite collection of not necessarily homogenous (of same type) but related data elements. The related data elements bound together in a record structure are called fields or attributes. A file is a collection of similar records. Each data item itself may be a group item composed of sub items; those items which are indecomposable are called elementary items or atoms. Fields in a record are named and used as identifiers.

Record and array structures have some similar and some different properties as described below.

Similarities are:

a) Like arrays, records are accessed directly through the use of field selectors, also called identifiers. In case of arrays, an element is accessed by an index number.

b) A record, like an array, occupies a consecutive block of cells in memory. The record’s accessing function calculates the location or address from a named field selector, called identifier.

No comments:

Post a Comment