With entity–relationship diagrams, there are two conventions of denoting multiplicities, (I) and (II):
Say, a teacher
T is giving
‹G› some lectures
L. Then we can either write this as
1 M (I) T ———‹G›——— L,
“Every teacher is giving multiple lectures and every lecture is given by exactly one teacher.”,
M 1 (II) T ———‹G›——— L,
“Any teacher participates in multiple giving-relations and any lecture participates in exactly one giving-relation”.
The picture becomes more complicated when we introduce ternary relations, say we want to express that a teacher is giving lectures in a certain room
1 ? M 1 (I) T ———‹G›——— L and (II) T ———‹G›——— L | | | ? | MC R R
Whereas I can interpret (II) by reading it as
“Any teacher participates in multiple giving-relations, any lecture participates in exactly one giving-relation, and any room participates in none or multiple giving-relations.”
and everything makes perfect sense, I see no way to interpret or express the situation in the case of (I).
For example, we (still) want to say that
“Every lecture is being given by exactly one teacher in exactly one room.”
So this seems to determine the multiplicity ‘1’ at the teacher (as already put in). But then, from the perspective of the room, the relation would read as
“In every room, there are being given (multiple) lectures by exactly one teacher.”
This is already false, as there might be many teachers giving lectures in a certain room.
As I understand is, interpretation (I) is used in UML class diagrams (and of course, sometimes for ER diagrams) – how is this resolved? What should I fill in for the question marks? Am I reading this stuff incorrectly?