Re: Thinking about MINUS
Date: 8 Jan 2007 22:13:23 -0800
Message-ID: <1168323203.377494.246140_at_11g2000cwr.googlegroups.com>
On Jan 8, 8:22 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Marshall wrote:
>
> > 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" ?
Heh.
Another example: consider the following function of two parameters:
> > 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.
Mmmm, not sure whether you understood me.
To my way of thinking, the database is a namespace that contains
named relvars, or in SQL we say "tables." *Each* table is itself
a separate namespace for attributes. The demonstration of which
is that we can reuse an attribute name in many different tables.
So there are two different levels of namespaces, an "upper" one
for relvar names and a "lower" one for attribute names.
(3 and 4 suck but illustrate that many approaches are possible.)
> Can you imagine a single proof or lemma in mathematics where the symbol
> x exists within multiple namespaces? In fact, one could look at a lemma
> as primarily introducing a separate namespace. As soon as one writes
> "Let x represent...", one defines the namespace of x.
Just so.
> > 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
Marshall Received on Tue Jan 09 2007 - 07:13:23 CET