The records in a recfile are by default not restricted to any particular structure except that they must contain one or more fields and optional comments. This provides the format with huge expressive power; but in many cases, it is also desirable to impose some restrictions in order to reflect some of the properties of the data stored in the database. It is also useful in order to preserve data integrity and thus avoid data corruption.
The following sections describe the usage of some predefined special fields whose purpose is to impose this kind of restriction in the structure of the records.
|• Mandatory Fields:||Requiring the presence of fields.|
|• Prohibited Fields:||Forbidding the presence of fields.|
|• Allowed Fields:||Restricting the presence of fields.|
|• Keys and Unique Fields:||Fields characterizing records.|
|• Size Constraints:||Constraints on the number of records in a set.|
|• Arbitrary Constraints:||Constraints records must comply with.|