Re: Codd's Information Principle

From: <compdb_at_hotmail.com>
Date: Fri, 30 Oct 2009 20:18:37 -0700 (PDT)
Message-ID: <aee9b313-b8b7-4cf9-844d-4f9ebd0fc407_at_s15g2000yqs.googlegroups.com>


On Oct 28, 12:51 pm, paul c <toledobythe..._at_oohay.ac> wrote:
> Recently there has been mention of logical connectors being implicit in
> tuples, eg. Mr. Scott wrote: "Each row of the join represents a
> conjunction of propositions, one for each operand", ie., what I think is
> called a compound proposition. I sometimes write similar, as well
> regarding disjunctions.  But usually my purpose is simply to understand
> the algebra.
>
> I would like to ask where is the "information" to the effect that
> certain rows represent compound propositions recorded?

The designer associates with each (base relation) variable and (the relation version of) each function a predicate (an informal but precise statement about the world). Eg for variable v: person number X has letter Y in their name. Eg for function +(A, B) returning C (whose relation version has attributes A, B and C where A+B=C and functional dependency {A, B} -> C): A plus B equals C. (So functions are just a way to use further base relations that don't change.)

Every relation expression has an associated predicate. One that is just a variable name is associated with that variable's predicate. One that is just a function application denotes the value of the function for values of the given argument expressions. One that is a relation literal is associated with the OR over tuples of the AND over attributes of the EQUALS of the name and the value. Eg if the literal is {X, Y}{<1, a>, <2,b>} then the associated predicate is (X=1 AND Y=a) OR (X=2 and Y=b). Every other relation expression is associated with the predicate you get by transforming its operands appropriately for the relation expression's operator. Eg if the relation expression is r JOIN s then the corresponding predicate is ((predicate associated with r) AND (predicate associated with s)); for r PROJECT ALL BUT x it's (EXISTS x (predicate associated with r)). So every relation expression corresponds to a logic expression. *So the relational model is just giving another notation for logic.*

Substituting a tuple typed by a relation into its associated predicate gives a proposition. If the relation variables' tuples are those that give true propositions from their predicates then an expression's tuples are those that give true propositions from its predicate. Ie if the variables and functions reflect the world so does a query result. So we observe the world, update the variables so that they reflect the world, then query. Repeat.

To update a variable is to give it a value reflecting the new way the world is. It doesn't matter what the predicate was in the old state for the expression you used. You are just specifying some new tuples. It just might be convenient to specify them in terms of the old state and/or other variables and/or literals.

> "Each row of the join represents a
> conjunction of propositions, one for each operand"

This doesn't make sense. Perhaps "one from each operand"? If so, yes. The predicate associated with r JOIN s is (predicate associated with r) AND (predicate associated with s). So each result tuple present makes this true and each result tuple absent makes this false.

> I would like to ask where is the "information" to the effect that certain
> rows represent compound propositions recorded?

The database designer gives the variable and function predicates. Only if you know them could you possibly observe the world and reflect it in the tuples that are and are not in the variables, or compose a query or interpret its results. Then each relation expression has a predicate based on the predicates of
its operands and the transformation of its operators (as explained above).
So the fact that JOIN result rows represent compound propositions is a property of the relational model, like that relations have tuples and attributes.

On Oct 29, 4:38 pm, "Mr. Scott" <do_not_re..._at_noone.com> wrote:
> Where is the "information" to the effect that 2 + 2 = 4 recorded? Certainly
> not as attribute values within tuples within relations.

The relation version of "+" has a tuple like <LEFT 2, RIGHT 2, SUM 4>; if you call + with 2 and 2 you get result 4. But the fact that "+" in a query denotes addition is in the heads of the
database designer and users.

>a relation value that has been obtained by a language devices
>such as insert or assignment where the definition is based on union.
>The 'OR' disappears.

The assigned tuples made the source expression's predicate true in the old state of the world and they make the assigned
variable's predicate true in the new state of the world (that's why you
assigned them). How you specified the tuples doesn't matter.

philip Received on Sat Oct 31 2009 - 04:18:37 CET

Original text of this message