| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Help with a relationship
> > >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 - 15:37:52 CDT
![]() |
![]() |