ORM Techniqueshttps://www.ormfoundation.org:443/forums/84.aspxThis forum is for discussing how to use ORM to model various scenarios.enCommunityServer 2007.1 (Build: 20917.1142)Re: Cardinality constraintshttps://www.ormfoundation.org:443/forums/thread/3031.aspxTue, 05 Jun 2012 19:26:26 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3031Matthew Curland0https://www.ormfoundation.org:443/forums/thread/3031.aspxhttps://www.ormfoundation.org:443/forums/commentrss.aspx?SectionID=84&PostID=3031<p>Hi JB,</p>
<p>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.</p>
<p>The cardinality constraints need to be intepreted with the same precondition, namely that the constraint applies to the population only if the population exists <em>at all</em>.</p>
<p>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 <em>Each Jury in the population of "JuryMember is seated on Jury" occurs there exactly 12 times</em>.</p>
<p>-Matt</p>Cardinality constraintshttps://www.ormfoundation.org:443/forums/thread/3030.aspxTue, 05 Jun 2012 15:58:18 GMT9d039735-a311-4a8d-9c49-a0bb2572af9e:3030JB4times40https://www.ormfoundation.org:443/forums/thread/3030.aspxhttps://www.ormfoundation.org:443/forums/commentrss.aspx?SectionID=84&PostID=3030<p>I've got a question about cardinality:</p><p>Is there a way to say # in {0,10} for example, a jury has either 12 members or 0 members.</p><p>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 <=.</p><p> </p><p>Thanks in advance. <br /></p>