Super Identifier - modelint/shlaer-mellor-metamodel GitHub Wiki

A Super Identifier is simply an Irreducible Identifier with one or more additional Attributes taken from the same Class.

The name 'Super' is taken from the term 'Superkey' defined in relational theory [RTCP]. All the same functional dependency properties that apply to an Irreducible Identifier also apply to a Super Identifier.

In almost all cases, we can safely ignore the potential Super Identifiers since we don't generally make use of them.

But there are cases, especially in a constrained loop like the Student-Professor example from [OOA96] that benefit by designation of some particular Super Identifier.

In the following examples we want to model the university where each Student may choose an advising Professor who works in the same Department as the student's major.

In this first example, we enforce the constraint by numbering both Student and Professor locally within each Department.

images/class-attribute-subsystem/super-identifier-10.png

In the above class diagram we see that R2 is formalized by creating a Reference to the Professor Identifier from the Student Class and then merging the Department referential Attribute. It is formalized as follows:

R3: Student.(Department) -> Department.ID
R2: Student.(Advisor, Department) -> Professor.(ID, Department)

But all this assumes that we have the luxury of numbering Student and Professor locally by Department. What if the university numbers all professors, students or both uniquely independent of Department?

images/class-attribute-subsystem/super-identifier-20.png

In the above class diagram we see that R2 is formalized by a reference to an Identifier with a single Identifier Attribute, Professor.ID. So merging the Department referential Attribute is no longer an option. Instead we would have to define a constraint on the value of the Student.Department Attribute via R3/R1. And this constraint would not be visible directly on the class diagram. You would have to dig into the model descriptions to find it. The formalization and constraint are as follows:

R3: Student.(Department) -> Department.ID
R3c: Student.Department = R3/R1/Professor.Department
R2: Student.(Advisor) -> Professor.(ID)

As we can see below, the declaration of a Super Identifier yields another solution.

images/class-attribute-subsystem/super-identifier-30.png

Here we have declared Super Key I2 on Professor which includes the Department Identifier Attribute. The * symbol is a suggested notation to clarify that this is a Super Key. Now we can reference that Identifier instead on R2 which brings the Department reference into the Student class so that we can define the merge as we did originally. There is now no need to specify any additional constraint.

Identifiers

  1. Number + Class + Domain

Attributes

No non-referential attributes