Re: Can relvars be dissymetrically decomposed? (vadim and x insight demanded on that subject)

From: erk <eric.kaun_at_gmail.com>
Date: 19 Jul 2006 12:50:14 -0700
Message-ID: <1153338614.251208.130340_at_h48g2000cwc.googlegroups.com>


Cimode wrote:
> erk wrote:
> > An "evaluation of a specific relation" means that you must be
> > evaluating an expression. Perhaps you mean "dereferencing", which would
> > return the value referenced by a variable?
> No. I mean a relation can be evaluated just as a function can be
> evaluated mathematically speaking.

What does "evaluate" mean, mathematically? Without bringing a formal definition into it, evaluation is a process of symbolic manipulation, to reduce an EXPRESSION to another expression (usually to a value, a kind of expression).

You really do mean dereferencing if you mean "getting the current value of a variable," like getting the current relval from a relvar. "Evaluation" is a different beast, and the word CAN be used, for example, to reduce the expression R1 UNION R2 if you know what R1 and R2 (or their current relvals) are.

> When a relvar hold a specific
> relvalue in time, then and only the such evaluation represents an
> relvalue N tuple set.

I have no idea what this means, but what does the evaluation "represent" the rest of the time?

> The definition of the relation itself can not be
> equated to either a specific relvalue nor to a relvar.

Then what is it?

> Besides the
> same relation can be expressed using several relvars: it still is the
> same relation.

So a Relation is a template, or type, for typing variables? If so, I think you should use a term other than "relation," which is already overloaded, as our discussion shows.

> For instance F(x) is expressed as 2 * x + 2 if you express another
> function T(y) as =
> 2 * y + 2 then F = T

Yes, but relations aren't quite the same. For an O-O example, let's say you have an object class called Boob. You can declare variables (references) as follows:

public Boob tweedleDee;
public Boob tweedleDum;

But although they're of the same type, that doesn't mean they're the same thing. Same with relations. Imagine this syntax:

relation T1 = {boob left, boob right} (or whatever you like, including constraints, such as left != right, except perhaps in cyclopettes)
...
relvar GREAT_BOOBS as T1;
relvar LOUSY_BOOBS as T1;

Both GREAT_BOOBS and LOUSY_BOOBS are of type T1, but have different meanings - their predicates are different. They're not the same.

So to me, the definition of "same relation" isn't the type, but the specific relvar. Since each relvar can occur in a database once and once only, that seems reasonable and useful.

> When the variable x in F or the variable y for T holds the value 2 both
> F and T = 2 * 2 + 2 = 6 .

F and T are the same function; changing the name of the free variable is meaningless. And functions which behave the same ARE the same. Relvars can have different relvals at different points in time; thus 2 relvars, even of the same re

> By analogy F and T are equivalent to relations R1 and R2,

No, they're not. Mathematically, functions are subsets of relations. And as we're discussing them here, I don't see the analogy.

> just as *x* and *y* are relvars, just as *6* is a
> specific relvalue to which relation R1 is evaluated when *x* and *y*
> have a specific relvalue.

This line in particular confuses me.

> I define relation as a specific type of function.

It's the other way around; a function is a specific type of relation.

> For relation
> definition, look for function definition as opposed to variable and
> value definitions.

Variables are a computing construct (and a poor replacement for postconditions and constraints); mathematics deals with values. Forgive the overgeneralization.

> > > An N tuples relvalue necessarily constitutes the *evaluation* a relation
> > > R1 but does not equate to R1.
> >
> > I don't understand this sentence.
> See above analogy.

Which I didn't understand.

> Definition of relation is independent from both relvalues and relvar
> definition.

Then please state the definition.

> > It defines a new function. It doesn't make sense to refer to a changing
> > function; you're defining a new one - for example, "F(x) = 2" has type
> > ANY -> int, while "F(x) = 2*x + 2" might be int -> int or number ->
> > number.
> Absolutely. Which is why a relation or a function should *not* be
> assimilated by deifnition to either relvar or relvalue.

But the relations we're talking about aren't exactly the same as mathematical ones. It would help if you defined relation as you understand it. In relational model term "relation" means either relvar or relval - it's loose.

> > There's no relationship between redefining a function F and changing
> > the relval assigned to a relvar (e.g. via update operations).
> True. I have used the example above the illustrate the danger to
> deifne relation accordingly to either relvalues or relvar. It just
> lead to false reasonning/

????

> The primary purpose of DB constraints through type definitions is *not*
> to restrict tuples in relvars but to restrict relvalues that later
> *fill in* the relvar.

True, I was sloppy.

> Therefore, a relvar can only be filled with
> permissible NTuples relvalues by definition. That is the whole point
> with RM definitions.

True.

  • erk
Received on Wed Jul 19 2006 - 21:50:14 CEST

Original text of this message