HP System Dictionary/XL General Reference Manual Vol 1 (32256-90004)

4- 36
departments of a company both want to use an entity called P-NUM. The Personnel department defines P-
NUM as a personnel number, while the manufacturing department wants to use it for part number.
System Dictionary easily handles this conflict by allowing you to create a domain for each application.
Within a single domain, System Dictionary does not allow two occurrences of the same type to have the
same name. For example, you cannot have two entities called PRODUCT-NAME of the same entity type
(for example ELEMENT) in the same domain. The same is true for relationships of the same relationship
type. However, System Dictionary does allow two entities that use the same name if the entities are of
different entity-types in the same domain. For example PRODUCT-NAME of type RECORD, and
PRODUCT-NAME of type ELEMENT do not conflict with each other. This also applies to relationships.
Using Domains as Partitions
Just as you can use an account in the MPE file system to contain a set of related files, you can use a domain
to contain a set of occurrences a specific application uses. For example, you may want to have similar sets
of occurrences for the Marketing, Personnel, Manufacturing, and R&D departments. You can easily
accomplish this by creating a domain for each of them, as shown in figure 4-1. Note that this also keeps
the occurrences for that application separate from those of all others in the dictionary.
The Common Domain
System Dictionary includes a built-in domain called the common domain, which is created when the
dictionary is initialized. You can use this domain as the standard dictionary, that is, the space where all
the standard entities and relationships reside, and it is accessible by any dictionary user.
The common domain in each dictionary may be its only domain, or instead, serve as the domain containing
information common to any number of local domains. (See the discussion on "linking", further on in this
chapter.) If you have no need for partitioning the dictionary, you would use the common domain only. You
can ignore the concept of domains, and when opening a dictionary, allow System Dictionary to default to
the common domain.
Local Domains
You can create your own domains, called local domains, which you can use as partitions or name spaces, as
described above. Local domains can be completely self-contained, that is, the occurrences contained in
them can have their own attribute values. Instead of the occurrences in each domain having their own
unique set of attribute values, which takes up more space and can make a dictionary "non-standard",
System Dictionary allows occurrences in local domains to share attribute values with occurrences in the
common domain. This saves space and creates a more standard dictionary, which is also easier to
maintain. Sharing attribute values is discussed further on in this chapter.
Creating Domains
You can create domains through either the System Dictionary intrinsics or an SDMAIN command. No
matter what method you use, an empty domain is created and given a user-specified name.
Domains and the Dictionary Structure
Although you can use the domain feature of System Dictionary to create separate sets of entities and
relationships, you cannot use it to create separate dictionary structure definitions. All domains in a
dictionary exist in the same dictionary structure, and therefore, regarding the structure, entities and
relationships are always specified and used the same way, no matter which domain you are using.
Accessing Domains