Re: Foreign superkey support

From: David Cressey <dcressey_at_verizon.net>
Date: Wed, 09 Aug 2006 11:40:15 GMT
Message-ID: <zQjCg.7730$1i.6279_at_trndny08>


"Jon Heggland" <jon.heggland_at_idi.ntnu.no> wrote in message news:ebbs61$efu$1_at_orkan.itea.ntnu.no...
> paul c wrote:
> > Please pardon my confusion about the lingo - isn't a foreign key just a
> > shortcut notation for an ASSERTION-type constraint?
>
> Yes, it is. I considered this too obvious to mention in my original
> post, but since Bob Badour felt the need to point it out in the very
> first response, and you apparently think it needs repeating, I guess I
> was wrong.
>
> Yes, foreign keys (and superkeys) are special cases of database
> constraints: arbitrary boolean expressions (referring to at least one
> relvar), typically in relational algebra, that are required to evaluate
> to true. As are keys, and tuple constraints. Thus, from a theoretical
> standpoint, we don't need any of them if we have general database
> constraints. And yet, we find it useful to have special syntax for some
> of the special cases---both for notational convenience, and for ease of
> implementation/optimisation. That is the reason for my interest in
> foreign superkeys; that, and the fact that (AFAIK) few DBMSs actually
> support general database constraints.
>
> Which leads me back to my original question: What is the state of the
> art with regard to constraint enforcement in DBMSs on the market? But
> perhaps a theory newsgroup is the wrong place to ask.

The above surprises me. I had thought that the CHECK constraint in Rdb/VMS was sufficiently general to express any and all Boolean conditions, and that the CHECK constraint would have been covered by numerous competitors. Am I wrong about the span of the CHECK constraint? Or do most DBMS's lack support for the CHECK constraint? Received on Wed Aug 09 2006 - 13:40:15 CEST

Original text of this message