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

From: DBMS_Plumber <paul_geoffrey_brown_at_yahoo.com>
Date: Mon, 16 Jul 2007 13:41:29 -0700
Message-ID: <1184618489.938441.216450_at_z28g2000prd.googlegroups.com>


On Jul 15, 2:16 am, "Roy Hann" <specia..._at_processed.almost.meat> wrote:
> "DBMS_Plumber" <paul_geoffrey_br..._at_yahoo.com> wrote in message
>
> news:1184480376.333327.38370_at_i13g2000prf.googlegroups.com...
>
> > 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:

http://citeseer.ist.psu.edu/cache/papers/cs/999/http:zSzzSzdb.cs.berkeley.eduzSzpaperszSzERL-M87-13.pdf/rowe87postgres.pdf

  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