Re: Help with a relationship

From: David Cressey <david_at_dcressey.com>
Date: Sat, 21 Sep 2002 20:37:52 GMT
Message-ID: <AM4j9.116$0I3.6861_at_petpeeve.ziplink.net>


> > >What does SQL have a FOREIGN KEY clause when the CHECK clause would
> > >suffice?
> >

Good question. But let me ask this: why do so many procedural languages have "if...then...else",
when "switch ...case" would suffice? You could always express if...then...else as two cases, true and false.

I think the answer to my question is that it seems to express intent just a bit clearer, and thereby makes the programs, on the average, easier to read.

Likewise, when I see a FOREIGN KEY constraint, I know a little more about the designer's intent than I would know from reading the equivalent CHECK constraint.

Of course, sometimes I think I know the designer's intent, but I'm misled. That's usually not intentional deception, but it's still confusing. Received on Sat Sep 21 2002 - 22:37:52 CEST

Original text of this message