Re: foreign key constraint versus referential integrity constraint

From: Nilone <>
Date: Thu, 22 Oct 2009 05:40:52 -0700 (PDT)
Message-ID: <>

On Oct 22, 5:22 am, Keith H Duggar <> wrote:
> Thanks to everyone. I think I understand more clearly now the
> inherent asymmetry of foreign key constraints. But now then my
> question is what is the common name for the semantic constraint
> that "attribute RV1:X and RV2:Y are sematincally joinable"?
> Because simply having the same type is not enough for example
> both OrderID and CouponID might both have type GenericID and
> yet we may want to state that it doesn't make sense to join
> them. Likewise attribute names for joinable attributes may be
> different in different relations (ie needing rename).

If two attributes have the same domain and are semantically comparable, I would call that a type. So I would call OrderID and CouponID types, and GenericID would be their supertype. It just so happens that the attributes of these types in Orders and Coupons have the same name as the name of their type.

Orders { OrderID : OrderID }
Coupons { OrderID : OrderID, CouponID : CouponID } Redemptions { CID : CouponID, OID : OrderID } OrderID <: GenericID
CouponID <: GenericID Received on Thu Oct 22 2009 - 14:40:52 CEST

Original text of this message