HP System Dictionary/XL SDMAIN Reference Manual (32256-90001)

4- 61
The relationship-position attribute is treated specially by the system. The system uses this attribute as a
sequencing number to order relationships with the same parent entity (i.e. to represent the order of
elements in a record). Accordingly, two relationships of a type with the same entity in the first position
cannot have the same value for relationship-position. To avoid conflicts, if you omit either relationship-
position completely or do not specify a value, the system assigns a relationship-position value to place the
new relationship at the end of the current list. That is, the system assigns a value greater than the largest
currently assigned to a relationship with the same parent entity. Note that this is different from other
default values as the default depends on the values assigned to other relationships and is different for each
relationship.
To link the relationship to a relationship in the common domain, the current version must be linked to a
version in the common domain.
If you assign the relationship an alias, the alias is associated with the second entity in the relationship.
Only the second entity in the relationship may have an alias, regardless of how many entities form the
relationship. Therefore, relationship aliases are typically useful only with binary relationships.
Open Mode: Shared-update or exclusive-update
Scope: DA scope or any scope with create capability. The scope with which the dictionary is
open is the owner of the relationship.
Example
The following example creates a new relationship ORDERS contains CUSTOMER of relationship type
IMAGE-DATABASE contains IMAGE-DATASET. It is linked to the relationship SALES contains SHIP-
TO (of the same type) in the common domain.
>CREATE RELATIONSHIP orders, customer;
>>RELATIONSHIP-TYPE = image-database,image-dataset;
>>RELATIONSHIP-CLASS = contains;
>>COMMON = sales, ship-to.
>
CREATE RELATIONSHIP-CLASS
Creates a new relationship class.
Syntax
C[REATE] R[ELATIONSHIP-]C[LASS] relation-class-name
[;INT[ERNAL] = internal-name ]
.
Parameters
relation-class-name External name of the relationship class to be created.
internal-name Internal name of the relationship class to be created. If not specified, the internal
name is the same as the relation-class-name.
Description
To avoid possible name conflicts with any future extensions to the core set, do not create any relationship