re: Lab4 pg 24

snippet

LanguageVersion is of Language(name)

LanguageVersion has VersionNr

\snippet

from the diagram in the ppt, I'm having trouble understanding what is the intended outcome of the equality constraint for

|is of| |

\
=

/

|has | |

Every permutation I try has a reading that kind of makes sense, but each generates errors, for example:

# 1.1 1.2

2.1 2.2

For each LanguageVersion and Language,

that LanguageVersion is of that Language if and only if that LanguageVersion has that VersionNr.

Model Error: Constraint 'EqualityConstraint2' in model 'ORMModel1' has role players in column '2' with incompatible types.

Model Error: Constraint 'EqualityConstraint2' in model 'ORMModel1' is implied by at least one constraint of the same type attached to a subset of the same roles.

# 1.2|1.1

2.2|2.1

For each LanguageVersion and Language,

that LanguageVersion is of that Language if and only if that LanguageVersion has that VersionNr.

Model Error: Constraint 'EqualityConstraint2' in model 'ORMModel1' has role players in column '1' with incompatible types.

# 1.1|

2.1|

For each LanguageVersion,

that LanguageVersion is of some Language if and only if that LanguageVersion has some VersionNr.

Model Error: Constraint 'EqualityConstraint2' in Model 'ORMModel1' is implied by mandatory constraint(s).

# 2.1|

1.2|

For each LanguageVersion,

that LanguageVersion has some VersionNr if and only if that LanguageVersion is of some Language.

Model Error: Constraint 'EqualityConstraint1' in Model 'ORMModel1' is implied by mandatory constraint(s).

# |1.1

|2.1

For each Language,

some LanguageVersion is of that Language if and only if some LanguageVersion has that VersionNr.

Model Error: Constraint 'EqualityConstraint1' in model 'ORMModel1' has role players with incompatible types.

# 2.1|1.1

2.2|1.2

For each LanguageVersionNr,

some LanguageVersion is of that Language if and only if that LanguageVersion has some VersionNr.

Model Error: Constraint 'EqualityConstraint2' in model 'ORMModel1' has role players in column '1' with incompatible types.

Model Error: Constraint 'EqualityConstraint2' in model 'ORMModel1' has role players in column '2' with incompatible types.

# 1.1|1.2

2.1|2.2

For each LanguageVersion and Language,

that LanguageVersion is of that Language if and only if that LanguageVersion has that VersionNr.

Model Error: Constraint 'EqualityConstraint1' in model 'ORMModel1' has role players in column '2' with incompatible types.

and so on...

Obviously my understanding of this kind of constraint needs improvement. but I'd like to know what the purpose for the restraint is in this case.

Thanks