Indexes provide an efficient means for accessing a table. There are two ways to access the index definition screen in AMT-COBOL Developer:

The following is a description of the index properties:
|
Property: |
Description: |
Value: |
|
Name |
Name of the index. |
<Text> |
|
Description |
Description of the index. |
<Text> |
|
Filegroup/ Tablespace |
Name of the MS-SQL filegroup or Oracle tablespace, as is defined by the database administrator. |
<Text> |
|
Default fill factor |
If checked, the index will use the default fill factor that is specified in the application options. If unchecked, the fill factor for the index will be set according to the value that is specified in the edit box on the right. For more help on determining a suitable value, please refer to the description for the default fill factor setting in the application options screen. |
|
|
Unique index |
If checked, then AMT-COBOL will enforce that key values created in the index will be unique. Any attempt to create records with non-unique key values will result in a SQL error. |
|
|
Primary
|
If checked, then the index is set as primary key. This also automatically selects "Enforce Unique index". The following conditions apply:
The primary key setting for an index overrules the application option "Create primary key on Lionrecno". |
|
|
Keys (panel) |
The keys for the index. |
|
|
Include Extra Columns (KeyOnly Reads) |
When performing KeyOnly reads the Columns selected in this panel will also be read beside the Columns of the Index Keys. The Columns selected will be added to the index but will not affect the unique constraints of the index. When using an Oracle database, including extra columns on a unique index will create an additional index on the database named: <Tablename>_<indexName>_UNIQUE |
|
|
Conditions (panel) |
Conditions can be specified which further filters the records that will appear on the index. You may use all fieldnames here and can use logical operators ("AND", "OR" and "NOT") and comparison operators ("<", ">", "="). As can be seen in the example there are several ways of using Boolean-type fields. Additionally a NULL check can be added by using "IS NULL" and "IS NOT NULL".
|
|
|
An index can be removed from the repository through the Revision Control screen.
After an index is added, adjusted or deleted, a Whole System generate is required, followed by a database reorganize.
To see which objects use the index, open the index definition screen. Double-click on the index name (or click the "+" next to the index name) to expand the node. This will show a "Relations" sub-node beneath the index name. Selecting this sub-node will display the relations table for the index. See 'Relations'.
See 'Documentation'.