Re: Dreaming About Redesigning SQL

From: Paul G. Brown <paul_geoffrey_brown_at_yahoo.com>
Date: 8 Oct 2003 01:06:10 -0700
Message-ID: <57da7b56.0310080006.47b550a9_at_posting.google.com>


Lee Fesperman <firstsql_at_ix.netcom.com> wrote in message news:<3F833025.76A6_at_ix.netcom.com>...
> Jan Hidders wrote:
> >
> > Seun Osewa wrote:
> > > I would also like to know the classical arguments against the network
> > > model or other "pointer based" models. The only things I know are
> > > that:
> > >
> > > ** using pointers to positions in memory or disk can be messy when
> > > data has to be moved around. But then is seems there are several
> > > simple ways to solve this, e.g. what I can only call "logical
> > > pointers".
> >
> > Correct. There's absolutely no reason to believe that you cannot have
> > data independence with logical pointer or references. I would however
> > argue that allowing entities without representable keys is not a good idea.
>
> Incorrect. Even though you call them 'logical' pointers, they are still physical
> artifacts and have no place in a truly logical view of the database. Databases are about
> data, and pointers are not data (or meta-data).

 Erm . .

  What's 'physical' about this?

  RELATION Dept ( Id Dept_Id KEY, Name String );   RELATION Emp ( Id Emp_Id KEY, Dept REF(Dept),

                    Name PersonName, Salary Money );

  RETRIEVE E.Name, DEREF(E.Dept).Name FROM Emp E;

  RETRIEVE E.Name FROM Emp E, Dept D
    WHERE DEREF(E.Dept).Id = E.Id AND D.Name = 'shoe';  

  This schema assumes a strict two-value logic, so Emp.Dept cannot, under any   circumstances what-so-ever, have anything in it except a 'logical reference'   to exactly one Dept tuple. How is this achieved under the covers? Who   cares! It's about the logical model.

  (I should note that this formulation kind of makes my skin crawl for    aesthetic reasons, but its a REF()/DEREF() model that is essentially    syntactic sugar around well understood key and foreign key semantics.)

   Not trying to start a flame war, really (though that's an easy thing to   do when you're as ignorant as I am). I'm just hoping that we can all   agree that it's the semantics of the model, not the syntax, which we ought   to care about. 'Logical pointers' (by which I mean this simple REF/DEREF,   and mindful of a memory I have to the effect that SQL-3 REF/DEREF are not)   are mappable to PK/FK, and to a wide variety of rules stated in terms of the   existance of a tuple with certain properties.

   The advantage of predicate logic is that there are various kinds of   rules which can't be stated using REF/DEREF. And when you have a choice   between two models take the one with the broader expressive power.

   KR

     P "twit filtered since 2003!" b Received on Wed Oct 08 2003 - 10:06:10 CEST

Original text of this message