![]() |
|
|||||||||||||||||
Record (computer science)This article is about the data structure. For the database term, see database record. In computer science, a record is a data structure aggregating several items of possibly different types; the items being aggregated are called fields (or members) and are usually identified or indexed by field labels, names identifying the fields. Typically, the fields in a record are fixed and related, each describing a different property of a single conceptual object. For example, we might have a record describing an employee, with a string field with the label name, and an integer field with the label age. Usually there are many aggregate objects created with the same structure, in this case one for each employee. Records are a critical building block of many basic data structures, including the tagged union, the linked list, the binary tree, and the object used in object-oriented programming. C calls a record a struct or structure; object-oriented languages such as Java, Smalltalk, and C++ often keep their records hidden inside objects (class instances); languages in the ML family simply call them records. COBOL was the first programming language to support records directly; Algol got it from COBOL, and Pascal got it, more or less indirectly, from Algol. An array of records can sometimes be implemented more efficiently with a parallel array. See alsoThe contents of this article are licensed from Wikipedia.org under the GNU Free Documentation License.
How to see transparent copy 01-04-2007 01:21:04 |
|





