| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Translating constraints to RM Terms
Jonathan Leffler 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.
OK.
>
> If A and B are attributes that must be compared (constrained) as you
> suggest, they would normally be the same type (defined on the same
> domain).
OK.
>
> Don't forget that a domain defines the complete set of values that can
> be stored in an attribute defined on that domain. If you have a domain
> of negative integers - call it A - and a domain of positive integers -
> call it B - then you can infer that all values in domain A are smaller
> than all values in domain B.
>
> So, I reject the contention that 'A < B' must be part of the definition
> of domain A, and I'm far from convinced that we are defining one domain
> in terms of another.
OK.
>
>> 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?
Then I guess my question is restated, does the RM have anything to say about defining one column in terms of another? While the constraint is generally expressed and accepted as existing as a property of the *table*, is it not in fact a fundamental property of COLUMN A?
-- Kenneth Downs Secure Data Software, Inc. (Ken)nneth@(Sec)ure(Dat)a(.com)Received on Mon Jun 06 2005 - 07:05:36 CDT
![]() |
![]() |