Re: Thinking about MINUS
Date: Tue, 09 Jan 2007 04:22:30 GMT
Message-ID: <aMEoh.42587$cz.623429_at_ursa-nb00s0.nbnet.nb.ca>
Marshall wrote:
> On Jan 8, 3:32 am, paul c <toledobythe..._at_oohay.ac> wrote:
>
>>Marshall wrote:...
>>
>>>Ah, but when we are joining, which is to say unifying, two relations,
>>>and the two relations each make different, *incompatible* claims
>>>about the type associated with a particular attribute name, then
>>>I would say that well meets the criteria for being "contradictory."
>>>
>>>...Well, if I have 10 Navel Oranges and 10 Tangerine Oranges and I ask how
>>
>>many Florida Oranges I've got, I would hope the answer would be zero,
>>not "contradiction".
>
> I would hope so too, but I wouldn't consider that to be an example
> of a type error. Hmmm. I need some kind of metaphor that illustrates
> that you're comparing two different kinds of things that shouldn't
> be compared, ideally that involves oranges and maybe one other
> kind of fruit, but I can't think of anything. Darn.
> Back to the original idea, which was what happens when you
> join two relations with an attribute name in common but different
> types for that attribute. Bob suggested using a union type, which
> is sound, however I prefer calling it a type error.
It is not an either/or thing. The resulting value is as I described, and if that value violates a constraint like "There are no union types", then it raises an error. However, how does one express the constraint if one does not recognize the value in the first place?
> (Also note that if we use the union type solution, the result will
> always be empty, which is a signal that the operation doesn't
> really do anything interesting.)
Do I understand correctly that your position is: "Contradictions lack interest" ?
> If we use a name in two different scopes, and use it differently
> in those two scopes, and we intend to merge the two scopes
> together, we need to resolve that.
Please note that the above provides additional context to explain the constraint. Whether it is an error depends on context.
One of the things join
> does is merge two namespaces, namely the attribute namespace
> of each relation.
I disagree. The join operation necessarily operates within a single namespace. Different invocations of the join operation may operate within separate namespaces, however.
> Well, I'm not explaining it very well. Hope to get more sleep tonight
> than last night.
I hope I get more sleep tonight than last night too--hopefully at least as much sleep as I got this afternoon! :P Received on Tue Jan 09 2007 - 05:22:30 CET