8.3. Referential Constraints

When we begin abstracting classes and attributes, our candidate classes might include attributes such as

  • Book.publisher

  • CreditCardCharge.accountNumber

  • Order.customerID

Attributes like these are characteristics of the classes, but they also refer to the related classes. It is important, then, that we capture the fact that each such attribute is tied to an association.

8.3.1. Referential Attributes

A referential attribute identifies the instance of the associated class.

Definition: A referential attribute is an attribute whose value is the value of an identifying attribute in one or more associated classes.

We tag the referential attribute with {Rn}, where n is the number of the association being formalized. For example, ...

Get Executable UML: A Foundation for Model-Driven Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.