Re: Translating constraints to RM Terms

From: Kenneth Downs <knode.wants.this_at_see.sigblock>
Date: Mon, 06 Jun 2005 09:40:55 -0400
Message-Id: <fg0en2-hrl.ln1_at_pluto.downsfam.net>


John wrote:

> Kenneth Downs wrote:
>

>> I'm wondering if some RM theorist might express something for me.
>> 
>> Consider table X with columns A and B.  There is a constraint that A must
>> be
>> less than B.  While we discuss such constraints every day, I realize I do
>> not know how to express such constraints in relational terms.
>> 
>> For instance, A is actually a domain, as is B, but the constraint A < B
>> must in fact be part of the very definition of the domain A, and here we
>> are
>> defining one domain in terms of another.  I realized I have not seen this
>> disccussed in the year or so I have been a regular here.  Is defining one
>> domain in terms of another allowed and considered trivial, no big deal? 
>> Is it actually not allowed and this is some SQL alteration of true RM?
>> 

>
> This is straightforward, but we must use the proper terminology.
>
> Relation X has Attributes A and B.
>
> For every Tuple t in the body of X, the attribute value for A must be
> "<" the attribute value for B.
>
> In X, the Attributes A and B are both of (in) some domain T.
>
> You have supplied insufficient information to define T, but it is worth
> noting that the domain T could be anything you like as long as the
> comparison operator "<" is well defined with respect to that domain.
>
> -----
>
> Informally then, you have tried to apply a constraint to the domains,
> which isn't what you wanted to do. The constraint is applied to the
> tuples in the relation, NOT to the domain(s).
>

Thank you for the straightforward reply.

-- 
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth_at_(Sec)ure(Dat)a(.com)
Received on Mon Jun 06 2005 - 15:40:55 CEST

Original text of this message