Re: Database-valued attributes?

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Wed, 12 Nov 2003 10:40:41 -0000
Message-ID: <bot2th$ope$1_at_gazette.almaden.ibm.com>


"Costin Cozianu" <c_cozianu_at_hotmail.com> wrote in message news:borjoh$1hdr38$1_at_ID-152540.news.uni-berlin.de...
> Paul Vernon wrote:
> > So you are saying that you see no meaningful difference between
variables
> > and values?
> >
> > !
> >
>
> First of all, variables are just a matter of convenience. There is no
> intrinsic need for variables.

Variables are a consequence of time. If we want to cater for (i.e. model) the reality that is the arrow of time, then we should, I suggest, see that at least one variable is intrinsic. Not considering time is, I suspect, a common reason why "theory"seems less practical in practice than in theory.

> Any algorithm that has variables (thus uses side effects) can be
> rewritten as an algorithm that doesn't use variables (side effect free,
> or purely functional). And no significant effort is required for that,
> often time is just a change of paradigm and often time the quality of
> code improves..

Agreed, but then algorithms only have quite a loose connection with time. I.e. AKAIU they don't need time to operate. Some algorithms may have a higher complexity than others, but functional algorithms do not (again, as far as I understand) logically require time to pass for them to compute thier output.

A relation expression takes the current value of the database variable as input, and outputs (at some subsequent point in time) the result of the relational expression. The database holds the state of the universe of discourse at each point in time, but we can only ever read the current state - anything else is not a good model of reality, because we cannot go back in time (or go forward without waiting).

The database variable is a good model of our reality as it reflect the facts:

o That information exists now and will still exist at now + 1 if nothing acts to remove or create it

o That we cannot know what information existed at any time previous to now, if we have now not got the information about what information existed at previous times.

o That we cannot know anything about what information will exist at future times unless we have constraints on what information can exist in the future (and agree not to alter such constraints as frequently s the infromation that they constrain)

You cannot model these facts without the concept of a variable IMO. If you make 'time' just another value, then you cannot model these facts. Don't get me wrong, time is a value (and should be represented as such), but it more than that, it also defines a variable.

> But even in a classical programming language setting where you have
> variables, you can set asside the variables and as variables and look at
> them as entries in a context, the context being always an implicit
> parameter in the call chain (or call stack if there is a stack). The
> context can then be accessed like any other map value.

If I understand, you say that variables (in a classical programming language) can be treated as values (by storing the variable name as a value, paired with the value contained by the variable), within a "context". Ok, I've no problem with that.

> I'm also curious, do you have a definition for variable ?

The Database

I.e. the database is the only intrinsic variable that I see as being needed (in most senerios), so the definition of the database would do as my definition for variables

Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Wed Nov 12 2003 - 11:40:41 CET

Original text of this message