Re: How to create a DBMS from scratch?

From: Christopher Browne <cbbrowne_at_acm.org>
Date: 28 Nov 2002 03:01:15 GMT
Message-ID: <as40tq$no1ri$2_at_ID-125932.news.dfncis.de>


In the last exciting episode, Andy Dingley <dingbat_at_codesmiths.com> wrote::
> On Mon, 25 Nov 2002 12:45:29 +0000, Rob Tweed
> <rtweed_at_imtcons.demon.co.uk> wrote:
>
>>Its interesting the way XML has brought back new life into the old
>>hierarchical databases,
>
> Interesting, but not a good thing.
>
> This commonality between XML and hierarchical DB's isn't a validation
> of the DB, more a condemnation of XML's rigidly tree-structured data
> model.

The fact that certain varieties of hierarchical queries are not particularly convenient in SQL is a bit of condemnation thereof.

You tend to have two choices:

  1. You iterate through the tree, an SQL query for each node, or
  2. Go with some cleverness ala the "Celko nested sets" approach.

A query-per-node gets inefficient fast. And while "nested sets" are very clever, that requires that anyone that manipulates such queries has to be *very clever*, and in the real world, we have to live with the fact that most people /aren't/ *very clever*.

That doesn't prevent XML-oriented approaches from having their own daunting concomittent problems...

-- 
(concatenate 'string "cbbrowne" "_at_acm.org")
http://cbbrowne.com/info/spiritual.html
"People need to quit pretending they can invent THE interface and walk
away from it, like some Deist fantasy." -- Michael Peck
Received on Thu Nov 28 2002 - 04:01:15 CET

Original text of this message