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

From: Cimode <cimode_at_hotmail.com>
Date: 20 Jul 2006 05:06:11 -0700
Message-ID: <1153397171.409345.21940_at_m79g2000cwm.googlegroups.com>


Tony D wrote:

> So, would this mean something like :
>
> relation := what we would otherwise think of as the relation header
> (plus a mapping ?)
No a relation is a tranformation of specific relvalues (N Tuples) into some other relvalue.

> relvar := what we would otherwise think of as an attribute
> relvalue := the result of 'evaluating' a 'relation' with the 'relvars'
> filled in with appropriate values
A relvalue is an NT Tuple set.

> If this is the case, and it is attempted to define a relation as a
> function, what is the type of the function ? That is, given a
> 'relation' R with 'relvars' of type A,B and C
A function that transforms NTuple set into other NT Tuple sets.

The type of the attribute is a mechanism that allows restriction of extraction of possible values.

> R : A -> B -> C -> ???
>
> Without thinking about it in great depth, I can see some problems here.
> We'd normally view a relation as a predicate, and the tuples as true
> propositions, so on the face of it you might say
A predicate is not a relation. A relation is a function while a predicate is a constraint mechanism that helps define through binary logic if Ntuple relvalues are possible candidates for possible INSERT/DELETE/UPDATE operation.

With attribute constraints respect, a predicate allows to define the coherence of an N-tuple system to become a permissible candidate relvalue to be added/deleted/updated to a specific relation. By definition, such predicate must be evaluated to true with all tuples.

> R : A -> B -> C -> Boolean
>
> But what are the implications of that ? (Presumably, the map of the
> function could only return True, otherwise could you directly assert a
> falsehood ?) Alternatively, what else could be the result type of an
> evaluation like this ?
Predicate is a mechanism that helps define if a relvalue is a *candidate* relvalue for UNION with the relvalue of some relation.

The consequence of a predicate evaluated to true + respect of constraints of UNIQUENESS + respect of relvalue - attribute data type constraints is the possibility to operate the relation to produce a new relation. For instance, consider R1(attribute1, attribute2) with the folowing relvalues...

Tuple1 R1{1, A}
Tuple2 R1{3, B}
Tuple3 R1{2, E}
Tuple4 R1{3, A}
Tuple5 R1{2, R}

Supppose attribute1 has data type allowing permissible values {1, 2, 3}. Supppose attribute2 has data type allowing permissible values {A, B, E, R, T}

Now consider relation R2 with same attributes as R1 but with different relvalues.
Tuple1 R2{2, A}
Tuple2 R2{1, E}

As you can see R1 UNION R2 would result in R3 with the following relvalues:

Tuple1 R3{1, A}
Tuple2 R3{3, B}
Tuple3 R3{2, E}
Tuple4 R3{3, A}
Tuple5 R3{2, R}
Tuple1 R3{2, A}
Tuple2 R3{1, E}

Such operation was possible because ALL tuples of R2 respect the following conditions:

  1. attribute1 and attribute2 in R1 are *respectively* of the same type than attribute1 and attribute2 in R2
  2. R1 INTERSECT R2 = NULL (no tuple in R1 is present in R2)
  3. Both relvalues of R1 and R2 allow to evaluate the same predicate because each tuple on both relations R1 AND R2 always evaluate to TRUE

> [ snippage ]
>
> Back to reading ...
Received on Thu Jul 20 2006 - 14:06:11 CEST

Original text of this message