Re: Thinking about MINUS

From: Marshall <marshall.spight_at_gmail.com>
Date: 8 Jan 2007 17:28:35 -0800
Message-ID: <1168306115.246120.251670_at_11g2000cwr.googlegroups.com>


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.

(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.)

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. One of the things join does is merge two namespaces, namely the attribute namespace of each relation.

Well, I'm not explaining it very well. Hope to get more sleep tonight than last night.

Marshall Received on Tue Jan 09 2007 - 02:28:35 CET

Original text of this message