On Apr 2, 2008, at 9:52 AM, Sacha Michel Mallais wrote:

It is definitely possible to have an optional to-one, just not one where the FK is also the PK.


But if the FK isn't the PK, then the FK isn't guaranteed to be unique. But it must be unique because it joins with the PK of another object which, by definition, is unique. I suppose that you could add a unique constraint to the FK, but that's cheating :-) (at least, to relational DB purists)

So an optional to-one relationship is really a to-many relationship constrained to contain no more than 1 object (i.e., 0 or 1 object). From the "EOModeler User Guide":

"Cardinality
Every relationship has a cardinality. The cardinality defines how many destination records can potentially resolve the relationship. In relational database systems, there are generally two cardinalities:

• to-one relationship — for each source record, there is exactly one corresponding destination record • to-many relationship — for each source record, there may be zero, one, or more corresponding destination records"

Aloha,
Art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to