How database files are described
Records in database files can be described to the field or record level.
- Field-level description. The fields in the record are described to the system. For each field you can describe the name, length, data type, and validity checks. You can also add a text description. Database files that are created with field-level descriptions are referred to as externally described files.
- Record-level description. Only the length of the record in the file is described to the system. The system does not know about fields in the file. These database files are referred to as program-described files.
Whether a file is described to the field or record level, describe and create the file before you can compile a program that uses that file. That is, the file must exist on the system before you use it.
- Externally and program-described data
Programs can use either externally described or program-described files.
- Dictionary-described data
You can define a program-described or an externally described file with the record format description that is stored in the data dictionary.
- Record format description
When you describe a database file to the system, you describe two major parts of the file: the record format and the access path. The record format describes the order of the fields in each record.
- Access path description
An access path of a database file describes the order in which records are to be retrieved. When you describe an access path, you describe whether it is a keyed sequence access path or an arrival sequence access path.
- Naming conventions for a database file
The file name, record format name, and field name can be as long as 10 characters and must follow all system naming conventions. Some high-level languages have more restrictive naming conventions than the system has.
Parent topic:
Database file concepts