Re: The fable of DEMETRIUS, CONSTRAINTICUS, and AUTOMATICUS

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Sun, 24 Oct 2004 00:38:22 GMT
Message-ID: <2QCed.5313$KJ6.831_at_newsread1.news.pas.earthlink.net>


Marshall Spight wrote:
> "Laconic2" <laconic2_at_comcast.net> wrote:

>>>As far as how it *ought* to be done, I claim the catalog should be
>>>the definitive source of truth, and the DDL should be syntactic
>>>sugar for manipulating the catalog. It's conceptually simpler that
>>>way.
>>
>>Can you really build a DBMS that way?

>
>
> Why wouldn't you be able to?
>
> I mean, for the catalog to be useful, it has to be correct. For
> it to be fully useful, it has to be complete. If it's correct and
> complete, why wouldn't it be definitive? Why have the
> *transient* DDL be definitive? The meta-state is persistent,
> right?
>
> Another line of thinking: the non-meta data is data just
> as much as the meta-data is. For non-meta data, we have
> the actual contents of the tables as the definitive source
> of truth. We *could* instead propose that the DML is
> the definitive source of truth. The contents of the
> table would be merely advisory; when we wanted to
> *really* operate on the data, we'd manipulate insert
> statements. RAA.

A couple of points.

  1. There's a boot-strapping problem. How do you create the initial load of data in the system catalog that describes the system catalog? You can't create the columns in the 'systables' before there's a 'syscolumns' table, nor can you create the 'syscolumns' table before there's a 'systables'.

     This need not be insuperable - it is a real problem, though.

2. Although the system catalog contains a lot of descriptive

     information, there are normally a number of other actions taken
     when a table is created.  Specifically, space is allocated in
     some manner.  Now, you might be able to use triggered actions or
     something similar to ensure that the space is allocated as you
     create a table (by inserting a row into the 'systables' part of
     the system catalog), or maybe as you add some columns to the
     table.

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/ Received on Sun Oct 24 2004 - 02:38:22 CEST

Original text of this message