Modifying a key

As new users are added to Service Manager and additional requirements are specified, you may find the need to modify keys in your database dictionary records in order to optimize performance.

Note: As with adding new keys, if records already exist in the file when you modify a key, Service Manager automatically performs a regeneration of file data when you update the database dictionary record.

A modification to a key may be a change in the field(s) comprising the key or a change in the key type definition.

Note: When you modify keys in a file that contains records, be careful when defining key types.

For example, do not change a key from a Nulls & Duplicates type to No Nulls if the field(s) comprising the key is all null (contains no value). In this case, each record that did not contain a value in the field(s) comprising the key would require an update, putting data in the field before the key could be changed to No Nulls.

A CREATE INDEX statement is generated when an existing key is changed. For example, if the key type is changed or fields are added to the key.

A DROP INDEX statement is generated when an existing key is changed. For example, if fields are removed from the key.

Note: If Service Manager determines it does not have rights to CREATE a TABLE, it assumes it also does not have the rights to perform any of the above operations either. In which case it writes all database definition language (DDL) into files in the<RUN directory>/ddl folder and accepts changes to the dbdict without performing the CREATE INDEX or DROP INDEX operations.

Related topics

Adding a key
Deleting a key
Arrayed structures
Alias fields
Methods for updating database dictionary records
Methods for deleting database dictionary records
SQL cache

Add a key as the first key
Insert a key between other keys
Add keys to bottom of the key list
Modify keys: Nulls and duplicates to unique
Delete a key
Create an active database dictionary record