Naming Mechanisms [ HP System Dictionary XL Gen. Ref. Vol. 1 ] MPE/iX 5.0 Documentation
HP System Dictionary XL Gen. Ref. Vol. 1
Naming Mechanisms
System Dictionary provides a variety of naming conventions that support
the definition of the following:
* Modifiable and non-modifiable names
* Alternate entity names called synonyms
* Subsystem-related names called aliases
* Internal numbers that programmers can use
A discussion of these naming mechanisms follows.
Internal and External Names
Every dictionary definition or structure that you can name has two names,
an internal name and an external name. The internal name is a stable,
non-modifiable name, while the external name can be changed. You can
also modify the external names of core set structures. This allows the
dictionary to be customized to meet the requirements of a particular
application, or localized to your native language, while still retaining
a compatible set of internal names.
When the dictionary is open, you specify a name mode, either internal or
external. If you select internal name mode, all definitions and
structures are accessed by their internal names only. In external name
mode, you can see only external names.
Primary Names
In System Dictionary, a primary name is the name of an entity as opposed
to its synonyms or aliases. Since an entity has two names--internal and
external--there are actually two primary names for each entity. In
internal name mode, an entity's primary name is its internal name. In
external name mode, an entity's primary name is its external name. The
primary name of the entity is the name returned when System Dictionary
returns an entity name.
Synonyms
A synonym is an alternate name that uniquely identifies an entity. An
entity may have multiple synonyms, but a synonym can refer to only one
entity. You can think of a synonym as a "pointer" that points to an
entity's primary name. All synonyms of a given entity, point to the same
primary name. You can use synonyms in any context where entity names are
allowed. You can modify, delete, or retrieve an existing entity by using
the synonym in place of the entity name.
A synonym has three parts:
* The synonym name.
* The name of the entity that the synonym points to.
* The entity type of the referenced entity. A synonym implicitly has
the same entity type as the entity it references.
A synonym name must be 32 characters or less. It may not contain
embedded blanks, and you cannot use the restricted characters in Table
2-1. Because System Dictionary allows you to use entity names and
synonyms interchangeably, synonyms are subject to the same uniqueness
requirements as entities. Two synonyms of a given entity type cannot
have the same name, and a synonym may not have the same name as an entity
of the same type.
A synonym points to a specific entity of a specific type. To create a
synonym, the underlying entity must already exist.
Aliases
An alias is an alternate name related to an entity's usage in a
particular subsystem. In System Dictionary, aliases are stored in
attributes of type alias. Alias attribute values are 32-byte character
strings that you can assign to any entity or relationship.
Unlike other dictionary names, an alias may contain embedded blanks. It
may also contain any combination of uppercase and lowercase characters.
System Dictionary always upshifts entity names, but aliases allow a
case-sensitive name to be kept exactly as it appears in a program.
An alias may contain any special characters, even the restricted
characters in Table 2-1. There are no uniqueness requirements for
aliases. An alias name can be the same as its entity name if desired,
and any number of entities and relationships can have the same alias.
When an alias is assigned to an entity, it documents an alternate name
that should meet the naming restrictions of the target subsystem
(although System Dictionary does not check the name against the subsystem
restrictions).
When you assign an alias to a relationship, it provides an alternate name
for the second entity in the relationship. For example, consider the
relationship CUSTOMERS contains LAST-NAME of type FORM contains ELEMENT.
You can give the relationship a VPLUS-ALIAS attribute that contains the
value LAST_NAME. In this case, the relationship-level alias documents an
alternate name for the LAST-NAME entity.
Internal Numbers
Every definition and structure in the dictionary has an internal number
that System Dictionary uses to optimize storage and retrieval. You can
retrieve these numbers by dictionary intrinsics and use them in place of
names for improved performance.
Relationship Identification
A relationship does not have a name. Instead, it is identified by a list
of entity names. A relationship type is similarly identified by a list
of entity type names rather than by a single name. Relationship classes
further qualify relationships and relationship types.
Each relationship in the dictionary has a single internal number that you
can use in place of the relationship's entity list. Similarly, each
relationship type has a single internal number that you can use in place
of the entity type list. A single internal number therefore, replaces up
to six names in a relationship or relationship type.
MPE/iX 5.0 Documentation