Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Constraints are only available in the NIAM view, and they are used for modeling limitations on the relations between entities. There are three types of constraints:

  • Uniqueness constraint for indicating the key of an entity for uniquely identifying the entity. Is linked to attributes of an entity.
  • Exclusion constraint for indicating that each of the entities excludes the other. Is linked to predicates of a fact.
  • Completeness constraint for indicating that two entities together complete the collection. Is linked to predicates of a fact.


Uniquely identifying an entity with uniqueness constraints
Setting a sequence number for uniqueness constraints
Displaying the name of a constraint relation

Excerpt Include
inc:incl_onthispage
inc:incl_onthispage
nopaneltrue

Table of Contents
maxLevel1


Anchor
135167632
135167632

...

Uniquely identifying an entity with uniqueness constraints

Like keys in a Crows Foot logical view, uniqueness constraints can be used for uniquely identifying an entity by linking it to one or more attributes in the entity. A single entity can have multiple uniqueness constraints.

To model the key, add a Uniqueness constraint object to the view. After that connect the key to the attributes in the entity you want to make part of this key by using a Link relation.


Image Modified

Anchor
-1226055177
-1226055177

...

Setting a sequence number for uniqueness constraints

If multiple uniqueness constraints are used, it is possible to assign them a sequence number. To assign a sequel number, follow these steps:

  1. In the view, select the uniqueness constraint, and then click Image Modified.

    Image Modified

  2. In the Enter sequence number window, type the number and click OK.

...

The sequence number is now displayed in the constraint:


Image Modified

Anchor
-1979789681
-1979789681

...

Displaying the name of a constraint relation

When a constraint is linked to an attribute in an entity or to a fact, only the constraint is shown with a relation to the other element. To explicitly show which element the constraint is linked to, you can display the name of the relation. To display the name, do as follows:

  • In the view, select the constraint, and then click the name that appears below the constraint.

    Image Modified


The name is now displayed below the constraint:


Image Modified


You can hide the name again by clicking it.