Associations

Use an Association rule to define a relationship between two classes based on matching values in pairs of properties. A typical use of an association rule is to enable your application to automatically add a join to a report that displays properties from both classes referenced in the association.

An example is Association rule pxAssignedOperatorInfo defined in Work-, which relates each instance to an assignment instance in Assign- by comparing pxAssignedOperatorID in Work- to pyUserIdentifier in Assign-. These relationships are inherited by descendent classes of the classes on which the Association is defined; in this example, all descendent classes of Work- and Assign-. The primary use of Association rules is in Report Definition rules, where they are used to add an appropriate JOIN to the automatically generated SQL for a query defined on the Association’s class when that query also references properties in the associated class.

Association rules are one-directional, and only apply when the primary class of a Report Definition rule is the same as, or is a descendent of, the primary class of the Association rule. More than one Association rule may be defined between two classes, if there are multiple ways of relating or joining instances of the two classes.

To represent the relationship between two classes A and B, you usually need to define two associations:

  • An association where the Applies To key part is A, which associates data instances in B to those in A.
  • An association where the Applies To key part is B, which associates data instances in A to those in B.

Access

To see the association rules available to your current application, select Designer Studio > Reporting > Report Components > Associations.

To see all association rules in your system, use the Records Explorer.

Where referenced

Association rules are referenced in report definitions, to allow a report to contain data from both the instances of the Applies To class and the joined or associated class.

Standard rules

There are more than 50 standard association rules, which are available automatically as you work with the Report Definition form. Before creating an application-specific association rule, check to see whether a standard rule is available that provides the association you need for a report.

PDN Resources

See PDN article When and how to create an association rule to support reporting.