Re: No exceptions?
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sun, 02 Jul 2006 21:24:19 GMT
Message-ID: <7QWpg.5323$pu3.120642_at_ursa-nb00s0.nbnet.nb.ca>
>
> For notational reasons only, if I give a name to the relation 'x = 1',
> say z, then I would say instead that if x is projected out of z, z is a
> boolean assertion. However, in my example 'x join y', I don't see that
> projection comes into play.
>
> Assuming a db language admits a statement like 'SELECT y WHERE x = 1;'
> and we treat the restriction 'x = 1' as a relation I think that is the
> same as "'x = 1' join y" and we have stated something different from 'x
> join y'.
Date: Sun, 02 Jul 2006 21:24:19 GMT
Message-ID: <7QWpg.5323$pu3.120642_at_ursa-nb00s0.nbnet.nb.ca>
paul c wrote:
>> paul c wrote: >> >>> paul c wrote: >>> >>>> Jon Heggland wrote: >>>> >>>>> paul c wrote: >>>>> >>>>>> Let me re-phrase my original question: Is there a logical flaw in >>>>>> substituting TABLE_DUM for x in the expression "x join y" when x >>>>>> is not >>>>>> in the catalogue? >>>>>> >>>>> >>>>> I don't know what precisely you mean by "logical flaw", so I'll pass >>>>> judgement. If something should be substituted for x (a "default >>>>> value", >>>>> so to speak), TABLE_DUM does seem the natural choice, though, as it >>>>> corresponds to false/zero in some sense. >>>>> ... >>> >>> I suppose my "logic", if I may call it that, went like this (at >>> evaluation time): >>> >>> 1) according to syntax, x must be a relation >> >> What about the relation 'x = true' ? Or rather 'x != false' ? >> >> >>> 2) according to the catalogue, there are no attributes for a relation >>> named x, so given that the syntax insists x is a relation, it must be >>> the same relation as either TABLE_DEE or TABLE_DUM >> >> Or it could be a boolean expression. If one treats 'x = 1' as a >> relation to handle restrict, then naturally x by itself is a boolean >> assertion. Is it not? >> ...
>
> For notational reasons only, if I give a name to the relation 'x = 1',
> say z, then I would say instead that if x is projected out of z, z is a
> boolean assertion. However, in my example 'x join y', I don't see that
> projection comes into play.
>
> Assuming a db language admits a statement like 'SELECT y WHERE x = 1;'
> and we treat the restriction 'x = 1' as a relation I think that is the
> same as "'x = 1' join y" and we have stated something different from 'x
> join y'.
Exactly, 'x join y' states 'SELECT y WHERE x;' or 'SELECT x WHERE y' instead.
> One practical implication of TTM's definitions that I can think of is
> that evaluation of 'x <and> y' is not possible if x and y each have an
> attribute with the same name but different types
Any two values of differing most-specific-types are unequal. Thus, if x and y each have an attribute z where the types are different, the join will have cardinality zero and will have an attribute z with the most specific supertype of the z attributes in x and y. This might be the universal supertype.
, in other words closure
> isn't possible,
It is possible. See above. Received on Sun Jul 02 2006 - 23:24:19 CEST