Re: globals besides relvars?

From: Marshall Spight <mspight_at_dnai.com>
Date: Tue, 29 Jul 2003 03:13:00 GMT
Message-ID: <0DlVa.3203$Oz4.625_at_rwcrnsc54>


"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message news:bg3oc0$1ec0$1_at_gazette.almaden.ibm.com...
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:WqcVa.148132$GL4.38052_at_rwcrnsc53...
> [snip]
> > For many things, a functional expression is better than the relational
> > equivalent. For example, I'd rather invoke the getTimeZone() function
> > than:
> >
> > Select * from TimeZone
> > unwrap relation into tuple
> > unwrap tuple into value
>
> Marshall, you are arguing about syntax, but..
>
> [snip]
> > Okay, I'm talking about the logical model of things.
>
> ..claim to be interested in the logical model.
>
> Syntax is mostly unimportant when at the logical level.

Sure. But I'm not talking about syntax; I'm talking about eliminating logically unnecessary logical operators.

> [snip]
> > Don't functions have access to the database?
>
> No.
>
> > Or do some of them have this access?
>
> No
>
> > *Some* code somewhere has to be able to access the database,
>
> Yes. Queries and Updates.

What about application code? What about stored procedures, or code that we'd like to run on the database because it's close to the data. Can't queries and updates exist inside functions, procedures, methods, what have you, in an application?

> [snip]
> > I'm groping my way towards a model where the concept of a
> > programming language's global variables
>
> The database is the only global variable. In fact it is the only varable *at all*.

I buy the "database is the only global variable." In fact, I think it makes sense to say this is true by definition. But the only variable *at all* is overstatement. What about local variables inside a function?

> If you do still want to talk about 'functions' that can access the global variable,
> then SQL table functions could be the place to start. They do things that you can't
> do with views, and their functionally is required in any good dbms IMO, but to my way
> of thinking, they are little more than macro expressions. Does suggest again that we
> need a better handle on how macros fit into things though.

Okay.

Marshall Received on Tue Jul 29 2003 - 05:13:00 CEST

Original text of this message