Re: Expressions versus the value they represent

From: David BL <davidbl_at_iinet.net.au>
Date: Wed, 14 Apr 2010 23:29:50 -0700 (PDT)
Message-ID: <1fd66112-c74d-4c7a-babe-cf609b98390c_at_r18g2000yqd.googlegroups.com>


On Apr 15, 10:31 am, paul c <toledobythe..._at_oohay.ac> wrote:
> David BL wrote:
> > On Apr 15, 5:01 am, com..._at_hotmail.com wrote:
> ...
> >> The relational algebra is just another syntax for FOPL.
> >> (So they can't possibly be at odds.)
>
> > You are merely talking about the correspondence between formulae in
> > FOL versus expressions in the RA. E.g.
>
> > RA: project((R1 join R2) union R3, {X})
> > FOL: exists y,z such that (P1(x,y) /\ P2(y,z)) \/ P3(x,y,z)
>
> > R1,R2,R3 are relvar names. X is an attribute name. P1,P2,P3 are
> > predicate symbols. x,y,z are variables.
> > ...
>
> Regarding precision, as far as I know, relvars are pointers and the
> several relational algebras do not manipulate pointers.

Perhaps we should say that R1,R2,R3 are relation symbols within the RA expression, and under an interpretation these symbols are given relation values. In that context, it appears that an RA expression is treated just like an FOL term.

Indeed to highlight the potential confusion consider this. One could write the following formula in a FOL with equality:

  for all R1, R2, R1 join R2 = R2 join R1

and in that formula R1,R2 are (bound) FOL variables and the FOL terms on the two sides of '=' are RA expressions. So even though on the one hand we often think of a correspondence between RA expressions and FOL formulas, within this FOL formula they are instead FOL terms. One presumably might refer to R1 and R2 as "relation variables".

So it seems that "relation variable" can be overloaded for two distinct purposes. When I see "relvar" I assume there is a physical database that holds particular named relation values at each moment in time. In that case we have a concept of assignable relvars accessible by some imperative language. The language is necessarily at least partly imperative because an assignment statement is by definition imperative.

I'm not sure what you mean by saying that a relvar is a pointer. What does it point at? Or do you mean a relvar name is like a pointer that points at an assignable variable within a physical database?

> (To me this means that an implementation of such an algebra doesn't
> require relvars.)

Yes by treating relation names as either FOL function symbols or FOL variables and by treating RA expressions as FOL terms. Received on Thu Apr 15 2010 - 08:29:50 CEST

Original text of this message