Re: Hierarchical queries and indexes

From: Laconic2 <laconic2_at_comcast.net>
Date: Fri, 8 Oct 2004 12:17:18 -0400
Message-ID: <87SdnUFgkYM_IPvcRVn-tw_at_comcast.com>


"robert" <gnuoytr_at_rcn.com> wrote in message news:da3c2186.0410080750.2fa60908_at_posting.google.com...
> Troels Arvin <troels_at_arvin.dk> wrote in message
news:<pan.2004.10.05.11.46.48.266310_at_arvin.dk>...
> <snip>
> > I realize that hypothetical thoughts on how things could/should be done
in
> > RDBMSes sometimes conflict with potential implementation difficulties,
> > backwards compatiblity issues, etc. - But since this is a theory-group,
I
> > hope someone is interested in discussing why hierarchical encoding
models
> > have to exist.
>
> a couple of reasons:
>
> primary: with unix and the ms-dos (pc-dos), the notion of tree structured
> file systems arose. this had not been true previously. since
> humans do 99.44% of what they do by extension, the notion that
> the "standard" structure of data as hierarchy took hold.
>
> secondary: there are some naturally occurring hierarchies --> org charts
> and bills of material, mostly.
>
> the problem with pushing lots of square pegs (structures which are not
> inherently hierarchical) into round holes (hierarchies) leads to all sorts
> of kludges. XQuery is just the latest.
>
> since Dr. Codd had IMS (a hard-wired hierarchical DB) as current practice,
> it is odd that the RDBMSs (and SQL) still don't handle them natively.
i'll
> ignore SQL-99 common table expressions, since they only exist in the
> unix/windoze version of DB2.
>
> one other issue with this sort of "model" is: how to handle intrusion of
> meta-data.
>
> for example, assume three generic tables (Mr. Celko, control your blood
> pressure); table1, table2, table3. now, the designers (loosely defined)
> decided that some data in table1 would be joined to some data in either
> table2 or table3. in order to record this relationship, there is a
> column in table1, next_table. the data is either 'table2' or 'table3'.
> there is a second column in table1, next_table_key_value, which is an
actual
> data value in table2 or table3; possibly both. processing these tables
> with SQL is not, in my estimation, possible.
>
> the designers have defined my such hierarchies, to varying depths, among
> 100s of tables in this way.
>
> so, it can be worse. and yes, so far as i'm concerned, doing the above
> reveals one to be as dumb as a sack of hair (to quote a texas friend); but
> antique COBOL programmers, and juvenile java programmers seem to think
> it's peachy keen. at least those from those groups that i work with.
> they don't have to do anything but serial select(s). and write a tonne of
> code to keep it all from falling apart; but, hey, that's their job.
>
> BobTheDataBasyBoy

Robert,

I have a different take on it.

Hierarchy is one of the basic tools the human mind uses to deal with complexity.

When Moses got tired of micromanaging the Israelites in the desert, he set up a hierarchical management structure (see Exodus). The Roman legions had a hierarchical officer structure. I think the lowest officer level was Centurion, who had 100 soldiers reporting to him. The Catholic church has been organized hierarchically (with exceptions) for almost two millennia.

When people began cataloguing the taxonomy of species in Biology, they used a hierarchical scheme that grouped species into genus, and so on. Recently, I think the tree structure has become too confining for the taxonomists. They will probably invent multiple inheritance, again.

When IT flourished in the 20th century, the same concept surfaced over and over again.

SNA networks are described as a hierarchy. Single inheritance generates a hierarchy of ancestors. IMS, as has been already pointed out, was hierarchical. The folders in windows describe a containment hierarchy.

Etc. Etc. etc.

Sometimes, this was a matter of implementation convenience. Sometimes it was a matter of conceptual clarity.

There was a great debate between the network database apologists, led by Charles Bachman, and the relational apologists, led by Ed Codd, sometime around 1974. Topics that were addressed in that debate are still being rediscovered, and debated again, among Usenet denizens.

And, of course, there's Dawn, who has suggested that the term "hierarchical database" was a straw man set up by the relational apologists, so as to make their own model look superior by comparison. (I'll just let Dawn and Alfredo come to a consensus between them! ... ducking...) Received on Fri Oct 08 2004 - 18:17:18 CEST

Original text of this message