Re: Distributed foreign keys (was Re: Category Types)

From: Bob Badour <bbadour_at_golden.net>
Date: Thu, 3 Jul 2003 19:45:21 -0400
Message-ID: <S74Na.244$6t7.30924927_at_mantis.golden.net>


"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message news:be11et$19jc$1_at_gazette.almaden.ibm.com...
> "Bob Badour" <bbadour_at_golden.net> wrote in message
> news:L0IMa.181$6s4.23391277_at_mantis.golden.net...
> > "Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message
> > news:bdv32u$14r6$1_at_gazette.almaden.ibm.com...
> [snip]
> then the simplest database
> > possable is
> > > (I think) just the empty database.
> > >
> > > So all we have in minimum is
> > >
> > > D - the database variable
> > > d - the value of the D == {} - the empty set (of tuples)
> >
> > Can a database value ever really be empty?
>
> Yearh, that's what I'm thinking (aloud) about. I would like to think so.
It
> would be nice. At the very least, there should be some known minimum
database
> value (which we could possibly then define as 'the empty database', even
if it
> wasn't...)

>

> >What about the system catalog?
>
> Indeed. If you have no non-catalog tuples in your database, do you then
need
> any catalog tuples? I think the answer might be that you don't. Your
catalog
> tuples just get created at the moment you insert any non-catalog tuples.

You still need the catalog so that you can ask the database how many relations it has--in this case zero.

> > Or is the system catalog a database value derived from a database value?
>
> Humm. Lets say there are two parts to the catalog. One is just a listing
of
> all tuple types currently in the database. This information is (or should
be)
> derivable and possibly should be kept seperate from the database proper.
If
> it is seperate, then maybe it is a 'meta database' and maybe should only
be
> accessable via meta/generic expressions. If you are quering values in this
> 'meta catalog', then I think, by definition you have a meta-query. E.g.
> counting the number of (populated) relations in your database using say
SELECT
> COUNT(*) FROM META_CAT.RELVARS is really a meta-expression for a basic
> exprssion such as. SELECT SUM(c) FROM (SELECT 'Parts', 1 as c FROM Parts
> UNION SELECT 'Suppliers', 1 as c FROM Suppliers ...) ?

>
>

> Second are the database constraints. These need to be explictly stated,
they
> are not derivable, so do need to be part of some database value. If a
given
> database has no constraints then this (part of) the database value could
be
> empty. Call this area the 'constraint catalog'. I (think) I'm happy to
> consider this part of the catalog as part of the database value proper,
albeit
> that it has certain semantics over and above the non-catalog part of the
> database. I.e. the constraint Boolean expressions all evaluate to true for
the
> current database value.
>

> > I think the system catalog is part of the possible representation of a
> > database value.
>
> So the poss rep of a database consists of a set of tuples - i.e. the
database
> proper - and (recursively) the 'derived' catalog database. Cool.

I was thinking more along the lines that one possible representation of a database value has two sets of relations. One set describes the database and the other set describes the data. One could consider the database "empty" whenever the latter set is empty. Another kind of "empty" would occur when the sum of the cardinalities of the data relations is zero.

Another possible representation is just a single set of named relations that contains both the catalog and the data. This single set would never be empty and would consist of the union of the two sets from the other possible representation above.

> Now what do we do with types. Are they just constraints on the
allowable/known
> subtypes of some universal Alpha type??

There is a universal subtype and a universal supertype assuming the dbms supports type inheritance. The system catalog would have a set of known or knowable types. The database variable has a constraint that all contained types are in that set.

I think a 'standard catalog' straw man project would be very informative. You suggested it. When are you going to kick it off? <g> Received on Fri Jul 04 2003 - 01:45:21 CEST

Original text of this message