Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: globals besides relvars?

Re: globals besides relvars?

From: Marshall Spight <>
Date: Tue, 29 Jul 2003 03:06:15 GMT
Message-ID: <HwlVa.3170$Oz4.376@rwcrnsc54>

"Bob Badour" <> wrote in message news:HvfVa.1373$
> "Marshall Spight" <> wrote in message
> news:S%bVa.149598$
> > > IMO A good catalog model would include relvars to holds things like
> current timestamp
> > > and current USER.
> >
> > Okay, but why do these things have to be relvars? I mean, the current
> timezone
> > is not a relation, it's a value from the timezone domain.
> Nobody said it has to be a relation. It is a value in a relation. All values
> in relations are values from one domain or another.

The intent of my question was, why do these things have to be *in* relations?

> > Current user is a
> > string or a User value or something. It's not a relation. So why must it
> go
> > into a relation?
> So that we can directly apply logic for its management.

Logic applies to more things than relations. Logic still applies in a universe where booleans are the only datatype.

> > I'm already aware that Codd so asserted, but I don't
> > see any good theoretical or even a good design reason for it.
> You don't see any good theoretical use for requiring a representation
> whereby one can use logic directly?

I don't see how logic is the exclusive province of relations.

> > Worse, if I make a relvar Timezone, I can issue nonsensical updates
> > to it. What does it mean to insert into Timezone?
> You presuppose a nonsensical relvar. Why should subsequent nonsense surprise
> or alarm anyone? It's just a straw man.

You misunderstand. We agreed that timezone could be stored (or whatever word your prefer for describing what happens when data is placed in a relation; I use "store") into a relvar. What do you propose I call this relvar, that has exactly one row and exactly one attribute, whose value is a timezone? I would call it "Timezone" but you apparently took that to mean something else; I can't imagine what. I suppose I could have called it RelationWithExactlyOneRowWhoseValueIsATupleWithExactlyOneAttributeWhichIsTheTimezone, but that seems a bit verbose.

> > Okay, so maybe
> > you say the fact that I have a no-columns key for the table makes
> > that insert fail. Or there's some kind of constraint that prevents
> > a delete from succeeding. But it would be better if the structure
> > made it the case that these nonsensical updates weren't even
> > expressible.
> Don't use a TimeZone relvar--use a sensible relvar instead.

Such as?

> > That's what you get if you make Timezone a global
> > *non-relation* variable.
> A global non-relation TimeZone variable is just as nonsensical as the relvar
> you propose above.

It is hard to imagine what you mean when you say that a variable containing the current value of the timezone is nonsensical. It seems so obvious to me what it means that I can't even explain it. It is the variable whose value is the timezone. What else is there to say? I'm pretty sure you know what a variable, a value, and a timezone are.

> If one allows the global distribution of a database (and
> I see no reason to prohibit distribution), the database does not have
> single, distinct time zone.

I'm talking about the logic model. This is the timezone for the current user, not the physical machine(s).

Marshall Received on Mon Jul 28 2003 - 22:06:15 CDT

Original text of this message