Re: Stored fields ordered left to right
Date: Mon, 29 Dec 2003 17:20:15 GMT
Message-ID: <jnZHb.693968$Fm2.598344_at_attbi_s04>
"Bob Badour" <bbadour_at_golden.net> wrote in message news:Ws6dnWXlao4FKnKiRVn-tA_at_golden.net...
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:dKIHb.681736$Tr4.1704642_at_attbi_s03...
> >
> > I was speaking of logically distinguishing attributes. I don't
> > see how the physical level is even relevant here.
>
> You don't see how logically distinguishing attributes by physical position
> violates physical independence and confuses logical and physical issues?!?
Again, I don't see the physical level being discussed here. I don't see that position or order are necessarily physical; they can be logical. In this case, they are.
> > > You are confusing an external physical representation with a logical
> > > representation.
> >
> > Interesting distinction, but not one that I can follow without further
> > information. Do you have a reference for further reading?
>
> Um, everything that has ever been written on logical data models and the
> relational model in particular.
Your citation lacks a certain hoped-for specificity.
> What exactly do you not understand? Do you
> understand external vs. internal? Do you understand physical vs. logical?
> Actually, you don't have to answer the last question because it is clear you
> do not.
I don't understand why you believe that order is necessarily physical.
> > > > It doesn't affect the semantics of relations or relational operators;
> > > > it just affects how attributes are identified.
> > >
> > > Huh? Of course it affects the semantics if positional ordering has
> meaning!
> >
> > Mumble. Operations like union, intersection, difference, are identical
> > either way. Join needs some work, but it's not what I'd call a huge issue.
>
> No, they are not identical. Consider the following:
>
> R1 = { { A=1, B=2 } }
> and
> R2 = { { B=2, A=1 } }
>
> What is R3 = R1 union R2?
> What is R4 = R1 intersect R2?
> What is R5 = R1 minus R2?
>
> If position matters, the answers are:
> R3 = { { A=1, B=2 }, { A=2, B=1 } }
> R4 = { }
> R5 = { { A=1, B=2 } }
That's not correct. If we are to do an apples-to-apples comparison of relations with named attributes vs. ordered attributes, the corresponding ordered relation would be:
R1 = { (1,2) }
R2 = { (1,2) }
(I chose attribute A to map to first posititon, and attribute B to map to second position.)
In which case:
R3 = { (1,2) } R4 = { (1,2) } R5 = {}
Which, using A -> first, B -> second, exactly corresponds to you answers for named attributes:
> If position does not matter, the answers are:
> R3 = { { A=1, B=2 } }
> R4 = { { A=1, B=2 } }
> R5 = { }
As I said, it is simply a question of how one identifies the attributes.
Marshall Received on Mon Dec 29 2003 - 18:20:15 CET