header part of the value?
- From: Marshall <marshall.spight@xxxxxxxxx>
- Date: Sun, 24 Feb 2008 10:48:51 -0800 (PST)
Occasionally the question has come up as to whether a
relation value is the body, or the body+the header. In the past
I've sided with the just-the-body approach, but today I decided
that I don't think that anymore.
Consider the algorithm to perform a natural join on two
relation values. Just values: not tables in a database
with a known schema or whatever. Just two plain relation
values. The natural join specification *requires* the header;
it is defined (in part) in terms of the header. So the header
must be part of the value.
Of course, that then leads me to think of a relation value
as a <header, body> tuple. (Let us omit column type
information for the present discussion.) Then one imagines
an updatable relation variable in a database as holding
a value of this tuple type. BUT then we notice that we
have this restriction that the header must not be updated.
Why is that?
Certainly in practice this is the sort of thing that would
be almost universally a good idea. But what theoretical
basis does it have? I can think of none. So I propose,
for your amusement, the mental model that a relation
variable is merely a simple binding from a name to a
<header, body> relation value, period, full stop. Also,
*customarily* the variable has the update constraint
that old.header = new.header.
Marshall
.
- Follow-Ups:
- Re: header part of the value?
- From: Jan Hidders
- Re: header part of the value?
- From: Tegiri Nenashi
- Re: header part of the value?
- From: paul c
- Re: header part of the value?
- From: David Cressey
- Re: header part of the value?
- From: JOG
- Re: header part of the value?
- Prev by Date: Re: Mixing OO and DB
- Next by Date: Re: header part of the value?
- Previous by thread: Question about joining tables
- Next by thread: Re: header part of the value?
- Index(es):
Relevant Pages
|
|