When talking about data models and databases, the term Cardinality is often used to describe the number of allowed elements in a given set.
UML often refers to the same property as Multiplicity.
Is there any differences between these two terms or are they synonymous?
2.2. The Multiplicity attribute of a relationship specifies the cardinality or number of instances of an EntityType that can be associated with the instances of another EntityType.
If you have 1.. * on the Class end that means that a Student has at least 1 and possible more Classes . 0.. * on the Class end means that a student could also have no Classes at all.
Multiplicity ... representation of an association is a line with an optional arrowhead indicating the role of the object(s) in the relationship, and an optional notation at each end indicating the multiplicity of instances of that entity (the number of objects that participate in the association).
Cardinality's official, non-database dictionary definition is mathematical: the number of values in a set. When applied to databases, the meaning is a bit different: it's the number of distinct values in a table column relative to the number of rows in the table. Repeated values in the column don't count.
The simplest explanation would be to say:
Multiplicity = Cardinality + Participation
Cardinality: Denotes the maximum number of possible relationship occurrences in which a certain entity can participate in (in simple terms: at most).
Participation: Denotes if all or only some entity occurrences participate in a relationship (in simple terms: at least).
Ex:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With