Descriptor Considerations

Descriptors (or inverted lists) enhance the performance of data maintenance routines, especially when created on the unique key of the data source. Without a descriptor, Adabas must read the entire data source to locate particular record instances. With a descriptor, Adabas can access record instances directly when given search values for the descriptor fields. A data source can have several associated descriptors. Descriptors created for performance reasons can be unique or non-unique. To use FOCUS referential integrity, create descriptors on lower level segments in the Master File.

If all of the following conditions are true, non-descriptor (non-key) fields can be used as non-unique descriptor fields:

You can define a unique key in a data source. When a key is unique, the concatenated values of the key fields in one record cannot be duplicated in any other record. A unique descriptor is generally defined on a unique key. Once you create it, Adabas automatically prevents the insertion of duplicate key values. Any attempt to insert a duplicate record instance generates an error message.

An example of a unique descriptor on a unique key is the employee ID in the sample EMPWRITE data source. Since no two employees can have the same employee number, the value in the EMPLOYEE_ID field makes each record unique:

EMPLOYEE_ID  LAST_NAME             FIRST_NAME
-----------  ---------             ----------
50004300     GUERIN                MICHELE   
50004600     VERDIE                BERNARD   
50004900     CAOUDAL               ALBERT    
50005500     BRAUN                 ALEXANDRE 
50005800     GUENTER               SIMONE    

You cannot add another record with EMPLOYEE_ID 50004300 to this data source.

Any segment below the root always has a unique key—the ORDER field. You can also use another field as either a non-unique key field (for example, SALARY) or as a unique key, if you are sure that none of the values are duplicated (for example, LEAVE_START).


Information Builders