IS5413 Chap.4 Relationship Degree and Cardinality Constraints
Relationship Degree and Cardinality Constraints
Degree first, because it fixes how many ends there are
Degree counts how many entity types take part in one relationship, and it is decided before anything else because the answer determines how many ends need cardinality. A unary relationship has one entity type on both ends of the line, so a staff member supervises other staff members. A binary relationship joins two entity types and is the common case.
A ternary relationship involves three at once, drawn as a single diamond with three legs, and each leg is read by holding the other two fixed and asking how many of the third the rule permits.
Two facts at each end, decided separately
Minimum cardinality answers whether participation is compulsory: zero means optional and one or more means mandatory.
Maximum cardinality answers how many are permitted: exactly one, or more than one. The notation puts the minimum mark nearest the box and the maximum mark outside it, which gives four combinations: mandatory one, optional one, mandatory many and optional many.
Students who decide the maximum first and copy the minimum across produce diagrams where both ends carry the same mark, and that symptom is usually visible before the content is checked.
Narratives state the maximum plainly and leave the minimum implicit, so the minimum is the one to write an assumption about when the text is silent.
When a relationship has to become an entity
Some facts belong to the association itself rather than to either participant.
The date a staff member finished a course is not a property of the person and not a property of the course; it exists only because that person took that course.
The published tests for converting are that all the relationships for the candidate should be many, that it could have meaning independent of the other entity types, that it would ideally carry an identifier of its own together with further attributes, and that it may participate in other relationships.
Ternary relationships are told to convert by default, because a three legged diamond is difficult to give a workable identifier to and will need one as soon as the relations are written.
History changes the cardinality, not just the attribute list
A time stamp is a time value attached to a data value, usually recording when the change occurred.
Once history must be kept, an attribute that looked simple becomes something else: a price with an effective date, repeated, is both multivalued and composite at once. The structural answer is an associative entity carrying a date from and a date to, where every past assignment is a row and the current one is the row with no end date. The move that is easy to miss is that the cardinality has changed too.
Without history a title has exactly one product line and the relationship is one to many; with history a title has had many lines and a line has held many titles, so the same pair of boxes is now many to many.
What this chapter covers
- 01
Unary, binary and ternary degree
- 02
Minimum against maximum cardinality
- 03
The four notations and how to read them
- 04
Two entity types sharing more than one relationship
- 05
The published tests for an associative entity
- 06
Time stamped history and the cardinality it changes
Worked example · free
Read a ternary relationship leg by leg
- 2State the degree and justify it from the narrative.
- 4Give the minimum cardinality on each of the three legs.
- 3Say what the unit price and lead time force, and why.
Key terms
- Degree
- How many entity types take part in one relationship: one, two or three. Decided before cardinality.
- Minimum Cardinality
- Whether participation in a relationship is compulsory. Zero makes it optional; one or more makes it mandatory. Narratives usually leave this implicit.
- Maximum Cardinality
- How many instances at the far end one instance may be associated with: exactly one, or more than one. Narratives usually state this plainly.
- Unary Relationship
- A relationship in which one entity type relates to itself, such as staff supervising staff or a course being a prerequisite for another course.
- Time Stamp
- A time value attached to a data value, recording when the event that changed the data occurred. Once history is required, structure has to change to hold it.
Relationship Degree and Cardinality Constraints FAQ
How do I read cardinality on a ternary relationship?
Fix two of the three entity types and ask how many instances of the third the business rule permits, then repeat for each leg. Reading all three at once produces confusion, because the rules are stated one leg at a time in the narrative as well. Write down each leg's answer before moving on, since the second leg often sounds like a restatement of the first until the fixed pair is named explicitly.
When should a many to many relationship become an associative entity?
When the association carries attributes of its own, when it could have meaning independent of the participants, and preferably when it has or deserves an identifier. The clearest signal is an attribute that belongs to neither participant alone. The published guidance also says ternary relationships should always be converted, regardless of whether they carry attributes, because the identifier problem arrives either way.
Why does keeping history change the relationship, not just the attribute?
Because the old relationship recorded only the current state. Once every past assignment has to survive, one instance on each side can be linked to many instances on the other over time, so a one to many relationship becomes many to many and needs a relation of its own carrying the dates. Students usually spot the new attribute and miss the cardinality change that came with it.
Exam move
Take five narratives and for each one write only the relationship lines: degree, then maximum at each end, then minimum at each end, in that order, with an explicit assumption wherever the narrative is silent about a minimum. Do not draw anything. The point is to make the three decisions consciously and in sequence, because almost every cardinality error comes from deciding the maximum and letting the minimum follow by habit.
Working through Relationship Degree and Cardinality Constraints in IS5413? Sia is AskSia’s AI Information Technology tutor — ask any IS5413 Relationship Degree and Cardinality Constraints question and get a clear, step-by-step explanation grounded in how IS5413 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.