Re: more algebra

From: Sampo Syreeni <decoy_at_iki.fi>
Date: Sat, 10 Apr 2010 13:37:48 -0700 (PDT)
Message-ID: <c25f8cae-4119-45d8-853f-b52a992e8319_at_s9g2000yqa.googlegroups.com>


On Apr 10, 9:45 am, com..._at_hotmail.com wrote:

> > say A join_K A=A instead, without renaming attributes.. We want to
> > express K_1=K_2 => (A\K)_1=(A\K)_2
>
> Please define this notation in terms of common operators.
> Preferably by equivalent formal notation not natural language.

The problem for me is that I'm impatient, and it's really difficult to write in genuine math symbology today. Absent that, I think the above example at least is a completely standard ASCII rendition: K stands for key, A stands for the first constant in use, subscripts are underscored, the implication arrow reads as =>, set difference uses \ or -, even operator precedence is in order, and additionally the primary symbols are explained in text. join_K is perhaps a bit interesting, but on the math side of things, juggling arguments between infix, prefix and subfix notations is really quite common, and is thought to be obvious as long as the parameter symbols don't vary on the way.

> I am interested in knowing what you are trying to say and helping you.
> But your writing always consists of vague phrases of which
> it is difficult to impossible to identify or guess the referents.

Thanks for putting up with me. That's the intuitive thinker speaking in me. Once you have the trait, it's rather difficult to shake it: you don't see the vagueness in your own writing even upon repeated reading and editing.

> This is exacerbated by misconceptions and histrionics.

The misconceptions you can correct, but yes, the histrionics is a tough problem. That's then the borderline/bipolar/alcoholic/depressed/ insomniac side of me speaking; the results can't be excused, but again the underlying reasons are somewhat difficult to control.

> The way to be clear is to put in the effort to force yourself to be clear,
> instead of settling for being unclear.

The most unclear and nonstandard part about what I was saying was perhaps joins without renaming. At least it bugged me the most afterwards. The idea there comes from one of my past lecturers. I never really understood how you could call the relational algebra closed in the standard, wider sense if you forbade joins among relations with identical attributes unless you renamed one of them first. His idea was that you can formalize the algebra in at least two different ways such that renames aren't required, but the whole thing still leads to equivalence with what you'd probably call the standard RM. Namely, taking a self-equijoin of a relation with the heading {A, B, C} on {A, B}, you could either define the unrenamed result (notionally {A, B, C, C'} with C=C') as the empty set when there is any case where C and C' disagree, or alternatively as the restriction to those tuples where there is no disagreement. The same sort of trickery can be performed on the definitions of the rest of the operators, e.g. by allowing joins on keys absent from one or both relations.

That does destroy some of the usual lattice properties of the theory, but when you go through with it, the resulting algebra agrees with the standard one. After the exercise, my suggestion of A join_K A=A goes through as well. We can disagree about whether it's best to formalize the theory this way or in some other, but personally I like the idea that all operators can be applied indiscriminately to any arguments at all.

--
Sampo
Received on Sat Apr 10 2010 - 22:37:48 CEST

Original text of this message