Re: foreign key constraint versus referential integrity constraint
Date: Sun, 25 Oct 2009 15:09:53 -0700 (PDT)
On Oct 24, 12:13 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Domains, however, define what is or is not joinable because natural join
> applies the equality comparison to attributes with like names, and
> domains define equality comparisons.
That may be the most practical perspective, but from a theoretical perspective, I find myself lately thinking that every value of every domain is theoretically able to be compared for equality with every value of every domain. If we are considering comparing an integer and a string, we can say with confidence ahead of time that the comparison will return that they are unequal.
I also am suspicious of the idea of allowing a domain designer to define equality. From a theoretical standpoint, the system ought to know enough to figure it out, and from a practical standpoint, I've seen enough class designers screw it up with subtle and annoying consequences. Damn them!