I have these three tables:
Customer
Rent
Book
The cardinality between the Customer and the Rent table is (1,6) and the cardinality between the Rent and the Book table is (1,infinity).
Using relational calculus's syntax, I would define a (0,1) cardinality like this:
∀x∀y∀z(rent(x,y)∧rent(x,z) → y =z)
But how can I define a (1,6) cardinality?
You could express it (in predicate calculus, as you have expressed your question) in this way:
If you prefer, you can write the condition
cardinality(set) ≤ nwith a complex logical expression of the form:or in a more concise way (see the note of @philipxy):