uniquekey Command

The kernel does not enforce the Type Name Revision (TNR) constraint to ensure object uniqueness within a vault. Instead, a uniquekey can be optionally defined. The uniquekey is a predefined selection of IPLM dictionary attributes. If defined, it is enforced by the kernel and behaves as follows.

  • Inheritance is mandatory
  • Inherited association = N; direct association = N
  • Unique-key driven (must be explicitly assigned to a type or relationship)
  • Uniquekeys are unique only for a single vault.

The implementation of uniquekeys creates a cryptographic hash and store the hash value in the database. For more information, see the Installation Guide.

This page discusses:

User Level

Business Administrator

Add Uniquekey

The Add Uniquekey command has the following syntax.

Syntax

add uniquekey NAME |type TYPE_NAME           | [ADD_ITEM {ADD_ITEM}];
                   |relationship REL_NAME    |
                   |interface INTERFACE_NAME |
  • ADD_ITEM provides additional information about the uniquekey being created:
    icon FILENAME
    [!|not]global
    description VALUE
    [interface INTERFACE_NAME]
    attribute NAME {,NAME}
    field FIELD_NAME [size SIZE]
    [!|not]hidden
    shortdescription
    property NAME [value STRING]
    property NAME [to ADMIN] [value STRING]|
    • ADMIN is one of:
      |TYPE NAME        |
      |RELATIONSHIP NAME|

Setting a Uniquekey for an Attribute

When adding a uniquekey for an attribute, you must specify a type, a relationship, or an interface, or a combination of interface with a type or relationship. That is, you must specify one of these:

  • type TYPE_NAME attribute ATTRIBUTE_NAME
  • relationship REL_NAME attribute ATTRIBUTE_NAME
  • interface INTERFACE_NAME attribute ATTRIBUTE_NAME
  • type TYPE_NAME interface INTERFACE_NAME attribute ATTRIBUTE_NAME
  • relationship REL_NAME interface INTERFACE_NAME attribute ATTRIBUTE_NAME

Restricting the Index Size for SQL Server

SQL Server restricts the size of the index to 900 bytes. For example, if you try to create two string attributes with length 255, since they are nvarchar columns, the size of the index for string attributes is calculated as 255*2 (for Unicode), which would go over the limit. You can use the size modifier with the Add Uniquekey command to restrict the size so that indexing is right.

Copy Uniquekey

The Copy Uniquekey command has the following syntax.

copy uniquekey SRC_NAME DST_NAME [MOD_ITEM {MOD_ITEM}];
  • MOD_ITEM provides additional information about the uniquekey being copied:
    name NAME
    description VALUE
    icon FILENAME
    [!|not]hidden
    add |attribute NAME                         |
        |field FIELD_NAME [size SIZE]           |
        |property NAME [to ADMIN] [value STRING]|
    remove |attribute NAME          |
           |field FIELD_NAME        |
           |property NAME [to ADMIN]|
    modify |field FIELD_NAME [size SIZE]
    property NAME [to ADMIN] [value STRING]|

Modify Uniquekey

The Modify Uniquekey command has the following syntax.

modify uniquekey NAME [MOD_ITEM {MOD_ITEM}];

For more information, see Copy Uniquekey.

Delete|Enable|Disable Uniquekey

The Delete, Enable, and Disable Uniquekey commands have the following syntax.

[delete|enable|disable] uniquekey NAME;