Re: A Simple Notation

From: Brian Selzer <brian_at_selzer-software.com>
Date: Tue, 10 Jul 2007 13:18:05 GMT
Message-ID: <hGLki.45816$5j1.18058_at_newssvr21.news.prodigy.net>


"David Cressey" <cressey73_at_verizon.net> wrote in message news:MFJki.7299$MV6.3883_at_trnddc01...
>
> "David Cressey" <cressey73_at_verizon.net> wrote in message
> news:eirji.2$475.1_at_trndny04...
>> In reaction to Brian's responses, I'm going to reformulate the notation,
>> using OR and <OR> instead of AND and <AND>
>
> After mulling this over for a while, I've reverted to my original
> formulation, based on <AND>
>
> So:
>
> [A B] means <NOT> (A <AND> B) as I originally posted.
>
> I may yet be convinced by Brian's symmetry observation to map TRUE and
> FALSE
> the way he suggested, rather than the way I originally chose. I'm not
> there
> yet, but I'm not discarding his suggestion either.
>
> Why did I revert?
>
> Well, I like how easy it is to express a series of natural joins in the
> original formulation:
>
> (A <AND> B <AND> C <AND> D) gets expressed as
>
> [[A B C D]]
>
> The extra pair of brackets simply provides a double negative.
>
> Consider a language vaguely like SQL, where one might have
>
> select <value-list> from <relational-expression> where <criterion>
>
> An example might be
>
> select
> (LAST_NAME || ', ' || FIRST_NAME as NAME,
> JOB_NAME as JOB_TITLE,
> DEPARTMENT_NAME as DEPARTMENT)
> from
> [[ EMPLOYEES JOBS DEPARTMENTS ]]
> order by
> NAME;
>
> I know this isn't valid SQL syntax, but bear with me. This is an imagined
> language.
>
> We can allow any relational expression at all in the "from" clause. That
> means we can express unions, merges, or whatever in a single select.
> But
> natural joins, which we'll be doing more often than not, have a
> particularly nice mode of expression, using this notation.
>
> Now I'm struggling with how natural joins work in a situation where there
> is
> more than one relationship between two tables. But that's a separate
> issue.
>

By the definition of a natural join, there can only be one relationship. In order for a tuple to appear in the result, there must be value agreement for *all* common attributes in the tuples from the operands.

>
>
Received on Tue Jul 10 2007 - 15:18:05 CEST

Original text of this message