The ORM Foundation

Get the facts!

Cardinality constraints

Last post Tue, Jun 5 2012 20:26 by Matthew Curland. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Tue, Jun 5 2012 16:58

    Cardinality constraints

    I've got a question about cardinality:

    Is there a way to say # in {0,10} for example, a jury has either 12 members or 0 members.

    In the book, Information Modeling and Relational Databases it says you can use # = 12, but this doesn't account for the empty set when a table is created, but doesn't show an example of how to account for the empty set, only to use a <=.


    Thanks in advance.

  • Tue, Jun 5 2012 20:26 In reply to

    Re: Cardinality constraints

    Hi JB,

    Dr. Halpin has formalized all ORM constraints such that an unpopulated relational database (the empty set) is always valid. So, for example, the set comparison constraints include subset, equality, and exclusion because these are not violated by empty sets. However, other set comparison operators (proper subset, proper superset, proper overlap) are not directly available in the constraint language for this reason. Similarly, frequency constraints apply only if there is some population, so the empty set is exempted from the constraint.

    The cardinality constraints need to be intepreted with the same precondition, namely that the constraint applies to the population only if the population exists at all.

    I think what you're looking for here is a frequency constraint of '12' on the 'Jury' role of 'JuryMember is seated on Jury'. The verbalization for this is Each Jury in the population of "JuryMember is seated on Jury" occurs there exactly 12 times.


Page 1 of 1 (2 items)
© 2008-2022 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service