The DDL category category_key identifies the data items within a category that form the basis for the category. The category basis uniquely identifies each group or tuple of items in the category. Using the analogy of the category as a table, no row in a table may have duplicate values for its key data items.
The choice of basis has important consequences in the specification of a category. It is important to ensure that the key items that form the category basis can be used to unambiguously identify any tuple of data items within the category. If this is not the case, then it may not be possible to reliably recover data items that are stored in the category. Because key items are required to address each tuple of items in a category, key items are considered mandatory items in the category.
It is interesting to note how the key data items have been selected for the categories that define the DDL, and how this choice of key items influences the structure of the DDL dictionary. In the DDL category _category_key, the basis includes both the the identifier for the category, _category_key.id, and the name of the key data item, _category_key.name. This choice of basis allows for any unique groups of items in a category to be defined as key items. The case of duplicate key item names within a category is forbidden by the data model. In the DDL category _item_type, the basis includes only the identifier for the item name, _item_type.name. This choice of basis has the desired effect of limiting the specification of item data type, _item_type.code, to a single choice for each data item.
The DDL for the category_key category is given in the following section.
save_CATEGORY_KEY
_category.description
;
This category holds a list of the item names that uniquely
identify the elements of the category.
;
_category.id category_key
_category.mandatory_code no
loop_
_category_key.name '_category_key.name'
'_category_key.id'
loop_
_category_group.id 'ddl_group'
'category_group'
save_
save__category_key.name
_item_description.description
;
The name of a data item that serves as a key identifier for the
category (eg. a component of the primary key).
;
save_