Re: relation types

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Fri, 5 Sep 2003 15:31:49 +0100
Message-ID: <bja6u2$1aai$1_at_gazette.almaden.ibm.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:cAP5b.507$Jc6.48843821_at_mantis.golden.net... [snip]
> I agree that the most specific type of both values is equal; however, D&D do
> not seem to define the relational operations in terms of most specific type.
[snip]

> The statement in RM Prescription 10 is really just a subset of the statement
> in RM Prescription 24. I think we both see a flaw, but take different
> approaches to resolving the flaw. If the relational operations operate on
> values, how can they infer constraints unless constraints apply to values?

Humm, good stuff Bob..

I guess (one of) my issues is: If relation values have constraints, where it that information
held ?

> I
> resolve this by noting that these generic operations operate on declared
> types rather than most specific types; thus, a constraint declared for a
> relation affects the type of the result of an operation.

> You resolve this by tossing constraint inference.

for values, not variables.

But does it make sense to say the relational operators operate on variables and relational expressions as well as values?

If I can only ever look at a value via some variable, then I can just look at the constraints on the variable. If I look at a value directly,so to speak, then indeed I only know it's set of <attribute:type> pairs, and nothing about it's declared constraints.

[snip]
> It really boils down to the difference between declared types and most
> specific types. It seems to me that we cannot apply the relational
> operations to values unless they have some declared type including declared
> constraints.

We can apply them, we just loose constraint inference if we have no value constraints.

[snip]
> I agree that it involves the difference between declared type and most
> specific type, but I am not certain we should limit declared type to
> relvars.

I need more thought here. I want to consider what this means to database values. Database values do have some place to hold the information about constraints - in catalog tuples...

Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Fri Sep 05 2003 - 16:31:49 CEST

Original text of this message