Re: A pk is *both* a physical and a logical object.

From: DBMS_Plumber <>
Date: Mon, 16 Jul 2007 13:41:29 -0700
Message-ID: <>

On Jul 15, 2:16 am, "Roy Hann" <specia..._at_processed.almost.meat> wrote:
> "DBMS_Plumber" <> wrote in message
> > As a footnote, Quel had/has a primary key / foreign key concept.
> When you say Quel, are you referring to a particular implementation of it?
> Ingres Quel is probably the most widely used implementation and I have just
> glanced at the latest manual to refresh my memory, and I see no mention of
> primary or foreign keys at all.

 Well - I messed that up.

 Roy's quite correct. The Ingres version of Quel contains no syntax to specify a primary key, or a foreign key. Even the 'relational-ness' of a Quel 'table' is optional - you get to say 'no duplicates' if you wish.

  My mis-remembering is due to the fact that I more recently used the Postgres variant of the Quel language, which is described here:

  There, you get to do the following kind of thing (close to a cut-n- paste from the reference).

  create PERSON ( Name = char[25],
Birthdate = date, Height = int4,
Weight = int4, StreetAddress = char[25], City = char[25], State = char[2]) key ( name, birthdate );

 What makes Postgres more novel is that you can do the following kinds of things:

create IMAGES ( loc = box, what = image ) key ( loc using Box_Ops );

  Then the database will forbid the addition of any new tuple to IMAGES where there already exists a tuple, such that Box_Ops.Equals ( Existing_Tuple.loc, New_Tuple.loc ), if you follow.

> > It wasn't just the SQL community who thought picking a single key was
> > a practical and useful idea.
> Which just goes to show that lots of people doing a silly thing doesn't
> constitute a sensible basis for doing it.

 [ another comment snipped ]

  Oh I agree. I'm just reminding folk that SQL wasn't the only relational language! Received on Mon Jul 16 2007 - 22:41:29 CEST

Original text of this message