 |
|
 |
|
Next: Season's Greetings
|
| Author |
Message |
External

Since: Jun 25, 2003 Posts: 182
|
(Msg. 16) Posted: Sun Dec 28, 2003 7:08 am
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: comp>databases>theory (more info?)
|
|
|
"Jonathan Leffler" wrote in message
> Dawn M. Wolthuis wrote:
> >>Dawn M. Wolthuis wrote:
> >><snip>
> >>>>> Date writes "...MVS fields are ordered left to right (and
> >>>>> so MVS files are certainly not relations, and the system is
> >>>>> certainly not relational)."
> >>>>>
> >>
> >><big snip>
> >>
> >>Allow me to play the role of the fool jumping in where angels
> >>fear to tread.....
> >>
> >>Two points which may clarify RDBMS implementation (as opposed to
> >>theory).
> >>
> >>1. The relationships are imposed externally to the data in the
> >>form of indexes and/or foreign keys. The data itself is
> >>unordered. [...]
> >>
> >>2. Within a table row the physical order of the columns as
> >>stored on disk need not conform to the logical order of the
> >>columns as specified in the CREATE TABLE statement. [...]
> >
> > Yes, this is most helpful. This is PRECISELY my understanding --
> > that deciding to remove the ordering from relational tuples is an
> > implementation issue and not about the logical theory of relations.
> >
> > I work with relations that are mathematical relations and are
> > therefore ordered tuples. The model behind XML documents is also
> > one of ordered tuples. So, if you hear of folks who might sometimes
> > spout that their database model is "more relational" than RDBMS's
> > it sometimes is due to this particular issue.
> >
> > Based on this, it sounds like a response to Date that says that
> > mathematical relations are ORDERED and not unordered tuples so that
> > this particular point is irrelevant (and, in fact, wrong) would be
> > an accurate response, right?
>
> It depends on the premises from which you work.
>
> One of the documented differences between mathematical relations and
> relations used in database theory is precisely this one - that the
> elements in a tuple of a mathematical relation are ordered (usually
> ordered pairs, in fact) but database theory uses unordered tuples,
> where each element logically consists of the combination attribute
> name, attribute type and attribute value. Of course, in a system
> without inheritance to complicate matters, the attribute type
> associated with a given attribute name is the same for all tuples in
> the relation (but the converse is not true). The difference between
> ordered mathematical relations and the unordered database equivalent
> is clearly stated in Codd's original (1970) paper, incidentally:
>
> Accordingly, we propose that users deal, not with relations
> that are domain-ordered, but with relationships which are
> their domain-unordered counterparts.
>
> [Note the implied distinction between what users see and what the
> system manages, too.]
>
> Many practical systems store each record (physical analogue of a
> tuple) with the fields (the physical analogue of an attribute) stored
> in the same order, which makes it easier to locate a given field
> within a given record. And many systems make life still easier by
> storing the data for a given field in a constant width, so it is
> trivially possible to pre-calculate the offset into the record for a
> given attribute value.
>
> To get back to the question - if you change the premises on which your
> version of relational theory is based to state that your tuples are
> indeed ordered, then of course Date's statements no longer apply. The
> theory about which he is making statements states that tuples are
> unordered. Both are valid sets of premises, but they are different
> sets of premises, and statements made about one are not valid for the
> other.
>
> As to which set of premises is better - that is a separate discussion.
> I strongly suspect there are a rather large number of issues that
> have to be resolved when you use ordered tuples rather than unordered
> tuples. Most notably, A JOIN B is not the same a B JOIN A under the
> ordered scheme - with consequences that need to be considered very
> carefully.
>
> And, reverting to the final question again - no, Date's comments are
> neither irrelevant nor wrong in the system about which the comments
> were made.
Mathematical relations do not rely on attribute order. The physical
representation of mathematical relations using written symbols on planar
surfaces conventionally uses attribute order for succinctness. >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: May 17, 2004 Posts: 217
|
(Msg. 17) Posted: Sun Dec 28, 2003 11:53 am
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bob Badour" wrote in message
<snip>
For anyone who doesn't know, ignore Dawn--she's an idiot. Mathematical
> relations do not have any particular attribute order. The physical
> representation of mathematical relations using written symbols on planar
> surfaces relies on physical order for succinctness.
>
Your opinions about relations are welcome, but please refrain from telling
me again what an idiot I am as I know your opinion already. If you want
others to join you in thinking I'm an idiot, use logic to indicate the error
of my thinking rather than telling people they ought to ignore me.
Thankfully, I can summon up the self-esteem to continue discussing in this
forum. I wonder how many people you have bullied or offended enough to
leave OR decided this list was not about rational thinking, but rather
personal attacks.
As for mathematical relations, they ARE sets of ORDERED TUPLES, whether on
paper or in concept. The ordering is important for mapping to the domains,
however, it is the case as one person pointed out that with database
relations as laid out by Codd, there is a simple mapping from those
relations to mathematical relations. There is still a vocabulary problem
when working with database models that did not stem from Codd and that DO
have actual mathematical relations in their model. "Relational Database" is
not a useful designation when both DB2 and U2 have this applied to them.
They are based on two very different models.
As someone once said (googling it indicates it was George Box?) "All models
are flawed, but some are useful". The "relational database model" has pros
and cons. The Nelson-Pick model has pros and cons. The XML model (very
similar to the Nelson-Pick model) has pros and cons. One of the advantages
of the relational model is that it has a wealth of documentation spelling it
out as a logical theory. Almost everything written about the Nelson-Pick
model is directed to the implementations (PICK) rather than the abstracted
logical model. I'm attempting to provide more of an abstracted model so
that the pros and cons of the model and not just the implementations can be
discussed. I am guessing that most on this list are big fans of the
relational database model, while I prefer other models. I think that is
what leads Bob to his false conclusion.
--dawn >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: Nov 30, 2003 Posts: 100
|
(Msg. 18) Posted: Sun Dec 28, 2003 1:30 pm
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bob Badour" wrote in message ...
> For anyone who doesn't know, ignore Dawn--she's an idiot. Mathematical
> relations do not have any particular attribute order. The physical
> representation of mathematical relations using written symbols on planar
> surfaces relies on physical order for succinctness.
Heh. If she thinks the relational tuple vs. ordered n-tuple difference
is insurmountable, she ought to try getting a mathematician and a
theoretical physicist to communicate. They use different definitions
for so many of the same terms that they'd have to invent an entirely
new language to talk about much of anything besides last night's game!
--
Joe Foster <mailto:jlfoster%40znet.com> Sacrament R2-45 <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above They're coming to
because my cats have apparently learned to type. take me away, ha ha! >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: Jan 21, 2004 Posts: 17
|
(Msg. 19) Posted: Sun Dec 28, 2003 3:30 pm
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bob Badour" wrote in message ...
> For anyone who doesn't know, ignore Dawn--she's an idiot. Mathematical
> relations do not have any particular attribute order. The physical
> representation of mathematical relations using written symbols on planar
> surfaces relies on physical order for succinctness.
Not quite right, Bob.
Mathematical relations *do* have an attribute order[1] (or else the
term 'mathematical relation' is used in another context entirely: to
refer to relationships between maps [can't find a cite]). One of the
ways in which Codd's relational model distinguishes itself is that it
names relation attributes and thereby does away with the need for
ordering. Some interpretations of the relational model retain the
attribute order property(Datalog, for example[2]) or require the use
of an index offset as an attribute identifier[3].
Mind you, multi-value data management systems don't comply even in
spirit with any of these models.
See:
[1] <a rel="nofollow" style='text-decoration: none;' href="http://en.wikipedia.org/wiki/Mathematical_relation" target="_blank">http://en.wikipedia.org/wiki/Mathematical_relation</a>
[2] <a rel="nofollow" style='text-decoration: none;' href="http://www.cs.buffalo.edu/~chomicki/635/datalog-h.pdf" target="_blank">http://www.cs.buffalo.edu/~chomicki/635/datalog-h.pdf</a>
[3] Abiteboul et al. _Foundations_of_Databases_ Addison-Wesley
Publishing Company. 1995. (Specifically comments on the 'named' verse
'unnamed' perspectives in Section 3.2) >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: Mar 11, 2004 Posts: 207
|
(Msg. 20) Posted: Mon Dec 29, 2003 1:24 am
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bob Badovr" wrote in message news:v6mdnQYXkoaxl3OiRVn-vw@golden.net...
> >
> > The qvestion is, how does one distingvish the attribvtes in the relation?
> > There are two choices: nvmerically/positionally, or by name. That is,
> > one either has a mapping from 1, 2, ... n to attribvte, or one has
> > a mapping from name1, name2, ... namen to attribvte. To me, it's
> > not all that great a difference. It's jvst a qvestion of what the
> > application is.
>
> Physical dependence vs. physical independence is not that big a
> difference?!?
I was speaking of logically distingvishing attribvtes. I don't
see how the physical level is even relevant here.
> > If one is writing a page of eqvations, the convenience of vsing
> > positional identification is high.
>
> Yov are confvsing an external physical representation with a logical
> representation.
Interesting distinction, bvt not one that I can follow withovt fvrther
information. Do yov have a reference for fvrther reading?
> > It doesn't affect the semantics of relations or relational operators;
> > it jvst affects how attribvtes are identified.
>
> Hvh? Of covrse it affects the semantics if positional ordering has meaning!
Mvmble. Operations like vnion, intersection, difference, are identical
either way. Join needs some work, bvt it's not what I'd call a hvge issve.
Marshall >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: Jun 25, 2003 Posts: 182
|
(Msg. 21) Posted: Mon Dec 29, 2003 3:11 am
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Marshall Spight" wrote in message
news:v6mdnQYXkoaxl3OiRVn-vw@golden.net...
> > >
> > > The qvestion is, how does one distingvish the attribvtes in the
relation?
> > > There are two choices: nvmerically/positionally, or by name. That is,
> > > one either has a mapping from 1, 2, ... n to attribvte, or one has
> > > a mapping from name1, name2, ... namen to attribvte. To me, it's
> > > not all that great a difference. It's jvst a qvestion of what the
> > > application is.
> >
> > Physical dependence vs. physical independence is not that big a
> > difference?!?
>
> I was speaking of logically distingvishing attribvtes. I don't
> see how the physical level is even relevant here.
Yov don't see how logically distingvishing attribvtes by physical position
violates physical independence and confvses logical and physical issves?!?
> > > If one is writing a page of eqvations, the convenience of vsing
> > > positional identification is high.
> >
> > Yov are confvsing an external physical representation with a logical
> > representation.
>
> Interesting distinction, bvt not one that I can follow withovt fvrther
> information. Do yov have a reference for fvrther reading?
Um, everything that has ever been written on logical data models and the
relational model in particvlar. What exactly do yov not vnderstand? Do yov
vnderstand external vs. internal? Do yov vnderstand physical vs. logical?
Actvally, yov don't have to answer the last qvestion becavse it is clear yov
do not.
> > > It doesn't affect the semantics of relations or relational operators;
> > > it jvst affects how attribvtes are identified.
> >
> > Hvh? Of covrse it affects the semantics if positional ordering has
meaning!
>
> Mvmble. Operations like vnion, intersection, difference, are identical
> either way. Join needs some work, bvt it's not what I'd call a hvge issve.
No, they are not identical. Consider the following:
R1 = { { A=1, B=2 } }
and
R2 = { { B=2, A=1 } }
What is R3 = R1 vnion R2?
What is R4 = R1 intersect R2?
What is R5 = R1 minvs R2?
If position matters, the answers are:
R3 = { { A=1, B=2 }, { A=2, B=1 } }
R4 = { }
R5 = { { A=1, B=2 } }
If position does not matter, the answers are:
R3 = { { A=1, B=2 } }
R4 = { { A=1, B=2 } }
R5 = { } >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: Mar 11, 2004 Posts: 207
|
(Msg. 22) Posted: Mon Dec 29, 2003 8:20 pm
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bob Badovr" wrote in message
> >
> > I was speaking of logically distingvishing attribvtes. I don't
> > see how the physical level is even relevant here.
>
> Yov don't see how logically distingvishing attribvtes by physical position
> violates physical independence and confvses logical and physical issves?!?
Again, I don't see the physical level being discvssed here. I don't
see that position or order are necessarily physical; they can be
logical. In this case, they are.
> > > Yov are confvsing an external physical representation with a logical
> > > representation.
> >
> > Interesting distinction, bvt not one that I can follow withovt fvrther
> > information. Do yov have a reference for fvrther reading?
>
> Um, everything that has ever been written on logical data models and the
> relational model in particvlar.
Yovr citation lacks a certain hoped-for specificity.
> What exactly do yov not vnderstand? Do yov
> vnderstand external vs. internal? Do yov vnderstand physical vs. logical?
> Actvally, yov don't have to answer the last qvestion becavse it is clear yov
> do not.
I don't vnderstand why yov believe that order is necessarily physical.
> > > > It doesn't affect the semantics of relations or relational operators;
> > > > it jvst affects how attribvtes are identified.
> > >
> > > Hvh? Of covrse it affects the semantics if positional ordering has
> meaning!
> >
> > Mvmble. Operations like vnion, intersection, difference, are identical
> > either way. Join needs some work, bvt it's not what I'd call a hvge issve.
>
> No, they are not identical. Consider the following:
>
> R1 = { { A=1, B=2 } }
> and
> R2 = { { B=2, A=1 } }
>
> What is R3 = R1 vnion R2?
> What is R4 = R1 intersect R2?
> What is R5 = R1 minvs 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 attribvtes vs. ordered attribvtes, the
corresponding ordered relation wovld be:
R1 = { (1,2) }
R2 = { (1,2) }
(I chose attribvte A to map to first posititon, and attribvte B to map to
second position.)
In which case:
R3 = { (1,2) }
R4 = { (1,2) }
R5 = {}
Which, vsing A -> first, B -> second, exactly corresponds
to yov answers for named attribvtes:
> 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 qvestion of how one identifies the attribvtes.
Marshall >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: Jun 25, 2003 Posts: 182
|
(Msg. 23) Posted: Mon Dec 29, 2003 8:20 pm
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Marshall Spight" wrote in message
> > >
> > > I was speaking of logically distingvishing attribvtes. I don't
> > > see how the physical level is even relevant here.
> >
> > Yov don't see how logically distingvishing attribvtes by physical
position
> > violates physical independence and confvses logical and physical
issves?!?
>
> Again, I don't see the physical level being discvssed here.
If implicit order is not physical, where does it come from?
> I don't
> see that position or order are necessarily physical; they can be
> logical. In this case, they are.
Nothing is more physical than position ie. location.
> > > > Yov are confvsing an external physical representation with a logical
> > > > representation.
> > >
> > > Interesting distinction, bvt not one that I can follow withovt fvrther
> > > information. Do yov have a reference for fvrther reading?
> >
> > Um, everything that has ever been written on logical data models and the
> > relational model in particvlar.
>
> Yovr citation lacks a certain hoped-for specificity.
As does yovr claimed lack of comprehension.
> > What exactly do yov not vnderstand? Do yov
> > vnderstand external vs. internal? Do yov vnderstand physical vs.
logical?
> > Actvally, yov don't have to answer the last qvestion becavse it is clear
yov
> > do not.
>
> I don't vnderstand why yov believe that order is necessarily physical.
The only logical orders are conventional collating seqvences of domains. All
other order is physical. It implies physical location whether absolvte or
relative. If not physical, where does the order come from?
> > > > > It doesn't affect the semantics of relations or relational
operators;
> > > > > it jvst affects how attribvtes are identified.
> > > >
> > > > Hvh? Of covrse it affects the semantics if positional ordering has
> > meaning!
> > >
> > > Mvmble. Operations like vnion, intersection, difference, are identical
> > > either way. Join needs some work, bvt it's not what I'd call a hvge
issve.
> >
> > No, they are not identical. Consider the following:
> >
> > R1 = { { A=1, B=2 } }
> > and
> > R2 = { { B=2, A=1 } }
> >
> > What is R3 = R1 vnion R2?
> > What is R4 = R1 intersect R2?
> > What is R5 = R1 minvs 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 attribvtes vs. ordered attribvtes, the
> corresponding ordered relation wovld be:
If order has meaning, stick with the order I gave yov for the operations.
> (I chose attribvte A to map to first posititon, and attribvte B to map to
> second position.)
It is not yovr choice. I already gave yov the order.
> > 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 qvestion of how one identifies the attribvtes.
Yov argve for implicit meaning encoded in order. I correctly identified the
attribvtes in my example, and I showed that if order has meaning the resvlts
differ. Order reqvires an additional step and greater vser knowledge to
achieve correct resvlts, which means the operations differ.
Omitting the semantic identifiers for the attribvtes only confvses matters. >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
External

Since: May 17, 2004 Posts: 217
|
(Msg. 24) Posted: Tue Dec 30, 2003 1:12 am
Post subject: Re: Stored fields ordered left to right [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Bob Badour" wrote in message
> > > >
> > > > 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.
>
> If implicit order is not physical, where does it come from?
>
<snip>
Just so it is clear, Bob, since you are filtering out my responses anyway,
Marshall is correct and you are wrong on this one, darlin'
Ordering of values is logically a function (=operator=map=procedure=method)
from (a subset of) the positive integers to a set of values (and likewise
ordering of attributes is a function from the positive integers to a set of
attributes). One can talk about ordering logically if one can talk about
numbers logically (and most of us can!).
--dawn >> Stay informed about: Stored fields ordered left to right |
|
| Back to top |
|
 |  |
| Related Topics: | union all vs. left outer join - Warning long mail ... For several days I have tried to figure out why two sql with an union all is much faster than using a single sql with left outer join. But I cannot get my head around this one. It is quite possible I am overlooking somethi...
Uniqueness over two fields - I'm trying to make a database that indexes items sold at online stores. One table called 'Stock' will contain items sold at every store included in the project. It will have the fields ID, SKU, Store. ID will be a unique primary key that respresents....
Negative Numbers in "Identity" or" Autonumber" fields - Any thought's on using negative numbers as surrogate primary keys? Working with some folks who are of the opinion that using ranges such as -1,-2,-3 is appropriate for surrogate keys for code tables. I'm of the opinion that this is impractical, as, yo...
Non Sequitur - <satire> Meteorologists have noted that there is an unusually high number of hurricanes in the Caribbean this year. Experts are in disagreement as to what the fundamental cause is. However, one frequent observer has conjectured that, "this...
The word "symbol" - A few days ago, VC commented on my use of the word "symbol" saying that I was inventing new terminology. I'm trying to restrain the urge to rant, and just give a sober reply. There is a book on my shelves, thanks to Joe Celko, who mailed it... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|