record_computer_science

Record (computer science)

Return to Record, Boot record, Records, Major programming topics, Programming topics, Programming languages, Software engineering topics, Software architecture, Software architecture topics, Awesome lists

In computer science, a record (also called a structure, struct, or compound data) is a basic data structure. Records in a database or spreadsheet are usually called “rows”.

Snippet from Wikipedia: Record (computer science)

In computer science, a record (also called a structure, struct, or compound data) is a basic data structure. Records in a database or spreadsheet are usually called "rows".

A record is a collection of fields, possibly of different data types, typically in a fixed number and sequence. The fields of a record may also be called members, particularly in object-oriented programming; fields may also be called elements, though this risks confusion with the elements of a collection.

For example, a date could be stored as a record containing a numeric year field, a month field represented as a string, and a numeric day-of-month field. A personnel record might contain a name, a salary, and a rank. A Circle record might contain a center and a radius—in this instance, the center itself might be represented as a point record containing x and y coordinates.

Records are distinguished from arrays by the fact that their number of fields is determined in the definition of the record, and by the fact the records are a heterogenous data type; not all of the fields must contain the same type of data.

A record type is a data type that describes such values and variables. Most modern computer languages allow the programmer to define new record types. The definition includes specifying the data type of each field and an identifier (name or label) by which it can be accessed. In type theory, product types (with no field names) are generally preferred due to their simplicity, but proper record types are studied in languages such as System F-sub. Since type-theoretical records may contain first-class function-typed fields in addition to data, they can express many features of object-oriented programming.

Records can exist in any storage medium, including main memory and mass storage devices such as magnetic tapes or hard disks. Records are a fundamental component of most data structures, especially linked data structures. Many computer files are organized as arrays of logical records, often grouped into larger physical records or blocks for efficiency.

The parameters of a function or procedure can often be viewed as the fields of a record variable; and the arguments passed to that function can be viewed as a record value that gets assigned to that variable at the time of the call. Also, in the call stack that is often used to implement procedure calls, each entry is an activation record or call frame, containing the procedure parameters and local variables, the return address, and other internal fields.

An object in object-oriented language is essentially a record that contains procedures specialized to handle that record; and object types are an elaboration of record types. Indeed, in most object-oriented languages, records are just special cases of objects, and are known as plain old data structures (PODSs), to contrast with objects that use OO features.

A record can be viewed as the computer analog of a mathematical tuple, although a tuple may or may not be considered a record, and vice versa, depending on conventions and the specific programming language. In the same vein, a record type can be viewed as the computer language analog of the Cartesian product of two or more mathematical sets, or the implementation of an abstract product type in a specific language.

External Sites

Data Structures: Array, Linked List, Stack, Queue, Binary Tree, Binary Search Tree, Heap, Hash Table, Graph, Trie, Skip List, Red-Black Tree, AVL Tree, B-Tree, B+ Tree, Splay Tree, Fibonacci Heap, Disjoint Set, Adjacency Matrix, Adjacency List, Circular Linked List, Doubly Linked List, Priority Queue, Dynamic Array, Bloom Filter, Segment Tree, Fenwick Tree, Cartesian Tree, Rope, Suffix Array, Suffix Tree, Ternary Search Tree, Radix Tree, Quadtree, Octree, KD Tree, Interval Tree, Sparse Table, Union-Find, Min-Max Heap, Binomial Heap, And-Or Graph, Bit Array, Bitmask, Circular Buffer, Concurrent Data Structures, Content Addressable Memory, Deque, Directed Acyclic Graph (DAG), Edge List, Eulerian Path and Circuit, Expression Tree, Huffman Tree, Immutable Data Structure, Indexable Skip List, Inverted Index, Judy Array, K-ary Tree, Lattice, Linked Hash Map, Linked Hash Set, List, Matrix, Merkle Tree, Multimap, Multiset, Nested Data Structure, Object Pool, Pairing Heap, Persistent Data Structure, Quad-edge, Queue (Double-ended), R-Tree, Radix Sort Tree, Range Tree, Record, Ring Buffer, Scene Graph, Scapegoat Tree, Soft Heap, Sparse Matrix, Spatial Index, Stack (Min/Max), Suffix Automaton, Threaded Binary Tree, Treap, Triple Store, Turing Machine, Unrolled Linked List, Van Emde Boas Tree, Vector, VList, Weak Heap, Weight-balanced Tree, X-fast Trie, Y-fast Trie, Z-order, Zero-suppressed Decision Diagram, Zigzag Tree

Data Structures Fundamentals - Algorithms Fundamentals, Algorithms, Data Types; Primitive Types (Boolean data type, Character (computing), Floating-point arithmetic, Single-precision floating-point format - Double-precision floating-point format, IEEE 754, Category:Floating point types, Fixed-point arithmetic, Integer (computer science), Reference (computer science), Pointer (computer programming), Enumerated type, Date Time);

Composite Types or Non-Primitive Types: Array data structure, String (computer science) (Array of characters), Record (computer science) (also called Struct (C programming language)), Union type (Tagged union, also called Variant type, Variant record, Discriminated union, or Disjoint union);

Abstract Data Types: Container (data structure), List (abstract data type), Tuple, Associative array (also called Map, Multimap, Set (abstract data type), Multiset (abstract data type) (also called Multiset (bag)), Stack (abstract data type), Queue (abstract data type), (e.g. Priority queue), Double-ended queue, Graph (data structure) (e.g. Tree (data structure), Heap (data structure))

Data Structures and Algorithms, Data Structures Syntax, Data Structures and OOP - Data Structures and Design Patterns, Data Structures Best Practices, Data Structures and Containerization, Data Structures and IDEs (IntelliSense), Data Structures and Development Tools, Data Structures and Compilers, Data Structures and Data Science - Data Structures and DataOps, Machine Learning Data Structures - Data Structures and MLOps, Deep Learning Data Structures, Functional Data Structures, Data Structures and Concurrency - Data Structures and Parallel Programming, Data Structure Libraries, Data Structures History, Data Structures Bibliography (Grokking Data Structures), Data Structures Courses, Data Structures Glossary, Data Structures Topics, Data Structures Research, Data Structures GitHub, Written in Data Structures, Data Structures Popularity, Data Structures Awesome. (navbar_data_structures - see also navbar_cpp_containers, navbar_math_algorithms, navbar_data_algorithms, navbar_design_patterns, navbar_software_architecture)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


record_computer_science.txt · Last modified: 2024/04/28 03:41 by 127.0.0.1