2. Overview of Tools and Languages : Terms and Concepts : Record Types : Records
 
Share this page                  
Records
Records allow you to organize your application by grouping data logically. They can help provide consistency throughout your application. (Records are similar to "records" in Pascal and "structures" in C.)
You can operate on an entire record as a single unit by using its name in a statement.
You can perform operations on the values in the record by using its name and the names of its attributes in a statement.
You can assemble records in arrays (see Arrays below).
For example, you can retrieve a record from a database table and assign all values from the database record to a single 4GL record. You can then map the record as a set of fields in a display (like a row in a table), or you can pass it as a unit to a frame or 4GL procedure. You can also work with the individual attributes of the record with a notation combining the record and attribute names. But the attributes of a record are not ordered, and cannot be referenced by index unless they are records in an array.
The following figure shows the structure of a record type and records. The record type is Stock. The records are named after the imaginary companies, Infinite Industries, Galaxy Books, and Poirot Investigation. The attributes of the record type are the two fields of Stock: Buyer_Name and Date_of_Purchase.