arXiv:2610.02603cs.DBOct 2026

Manuscript Offprint

arXiv:2610.02603

Look Here or Look Across: Unified Cardinality Constraints for N-ary Relationships

Huanyi Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

HUANYI CHEN, University of Waterloo, Canada

A cardinality constraint written on an edge of an entity–relationship diagram admits two opposite readings. Under the reading used by UML and by Chen’s original model, the label is read with the entity set on the same side of the relationship; under the reading used by standard database textbooks, it is read with the entity set on the opposite side. The two readings are exact opposites, so a reader who assumes the wrong one takes away the opposite of what the designer meant. For binary relationships the difficulty is confined to interpretation, because the two constraints a binary relationship set admits can both be drawn. For relationships among three or more entity sets the picture is worse: a ternary relationship set admits twelve cardinality constraints, and a diagram with three edges can carry at most three of them. This paper presents a notation, Card(R; p; q) = (lower, upper), that removes the ambiguity without taking a side in it, and that is not limited to one constraint per edge. We give the number of constraints an n-ary relationship set admits, show which of them a design determines without ever writing them down, and state two inference rules, decomposition and augmentation, that derive one constraint from another, together with the side conditions under which each is sound. We close with a worked case study that turns three business requirements into three explicit constraints and nine more that the design decides on its own.

CCS Concepts: • Information systems → Entity relationship models; • Social and professional topics → Computing education; • Mathematics of computing → Discrete mathematics.

Additional Key Words and Phrases: Entity–relationship model, cardinality constraints, n-ary relationships, conceptual modelling, database design, computing education

1 Introduction

Entity–relationship (ER) modelling is one of the essential topics of a database course. Its purpose is to equip students to turn business requirements into a database schema, and the step where that translation is actually made is the assignment of cardinality constraints [1, 8].

Correctly understanding those constraints is therefore critical, and it is also where students most often go wrong. In our experience nine out of ten students fail to interpret a cardinality constraint correctly, and the true proportion may be worse. The reason is not that the concept is difficult. It is that there are two interpretations of a cardinality constraint in an ER diagram, and that the two are exact opposites. The two interpretations are scattered without warning across textbooks, tools, and the web, so a student who reads a diagram has no way of telling which one the designer had in mind.

Consider the familiar requirement set for a university database:

(1) A person can be assigned to at most two departments at a time.

(2) For each assigned department, a person cannot work on more than one project.

(3) Every project must be associated with at least one department, with at least one person working on it.

It is important that these constraints be enforced in the database, because they become difficult to enforce once real data has been populated. But before they can be enforced they must be written down, and it is precisely at that step that the two readings diverge.

Contributions.

  • We name the two readings, look here and look across, and show that they are not two theories but one object with its arguments exchanged ( §2§2).

Author's Contact Information: Huanyi Chen, University of Waterloo, PhD Alumnus, Canada, huanyi.chen@uwaterloo.ca.

Chen

Figure

Fig. 1. A binary relationship set carrying two cardinality labels. The M sits on the Instructor edge.

  • We introduce the notation Card(R;p;q)=(lower,upper)\text{Card}(R; p; q) = (\text{lower}, \text{upper}), which states a constraint without committing to either reading and without limiting a relationship set to one constraint per edge, and we give the number of constraints an n-ary relationship set admits: 3n−2n+1+13^n - 2^{n+1} + 1 ( §3\S3).

  • We show that a constraint nobody wrote down still has a meaning, that the default is (0,∗)(0, *), and that a design determines many of the remaining constraints on its own ( §4\S4).

  • We state two inference rules, decomposition and augmentation, that derive one constraint from another, together with the side conditions that make each sound, and we define what it is for a constraint to be implied, redundant, or contradictory ( §5§5).

  • We work a case study in which three business requirements become three explicit constraints and nine further constraints that the design decides ( §6§6).