Re: Foreign superkey support

From: Jon Heggland <jon.heggland_at_idi.ntnu.no>
Date: Wed, 09 Aug 2006 07:32:54 +0200
Message-ID: <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.

-- 
Jon
Received on Wed Aug 09 2006 - 07:32:54 CEST

Original text of this message