dbTalk Databases Forums  

Re: foundations of relational theory?

comp.databases.pick comp.databases.pick


Discuss Re: foundations of relational theory? in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #391  
Old   
Mike Preece
 
Posts: n/a

Default Re: foundations of relational theory? - some references for the truly starving - 11-10-2003 , 12:12 AM






"daveb" <davebest (AT) SuPsAaM (DOT) net> wrote

Quote:
"Database Guy" <dbguy101 (AT) hotmail (DOT) com> wrote in message
news:7fdee71c.0311081524.77d4fc78 (AT) posting (DOT) google.com...
davebest (AT) usa (DOT) net (Dave Best) wrote in message
In Pick, the primary key of a MV element is the primary key
of the record plus its array index.

Really? So how does PK persistence work when you insert or delete
values in the array?


DG
It doesn't. Pick is not relational. I was just showing a mapping between
the relational model and Pick's physical model, thereby exposing a weakness
in the physical model. To preserve "PK persistence" as you call it, one
would need to actually have a PK for the MV columns. This would be
problematic, since it's really a collection of MV columns synchronized
together that form a nested relation, and Pick itself doesn't know about the
multi-column association; it's up to the application to maintain this.

Isn't the PK preserved anyway? The position of a multivalue is
inherent - if the datum changes its position so does it's PK change.


Reply With Quote
  #392  
Old   
Anthony W. Youngman
 
Posts: n/a

Default Re: foundations of relational theory? - some references for the truly starving - 11-11-2003 , 05:26 PM






In article <1b0b566c.0311092212.57b13af0 (AT) posting (DOT) google.com>, Mike
Preece <michael (AT) preece (DOT) net> writes
Quote:
It doesn't. Pick is not relational. I was just showing a mapping between
the relational model and Pick's physical model, thereby exposing a weakness
in the physical model. To preserve "PK persistence" as you call it, one
would need to actually have a PK for the MV columns. This would be
problematic, since it's really a collection of MV columns synchronized
together that form a nested relation, and Pick itself doesn't know about the
multi-column association; it's up to the application to maintain this.


Isn't the PK preserved anyway? The position of a multivalue is
inherent - if the datum changes its position so does it's PK change.
And aren't PKs optional in relational theory, anyway?

Cheers,
Wol
--
Anthony W. Youngman - wol at thewolery dot demon dot co dot uk
Witches are curious by definition and inquisitive by nature. She moved in. "Let
me through. I'm a nosey person.", she said, employing both elbows.
Maskerade : (c) 1995 Terry Pratchett


Reply With Quote
  #393  
Old   
Jonathan Leffler
 
Posts: n/a

Default Re: foundations of relational theory? - are primary keys optional? - 11-13-2003 , 01:03 AM



Anthony W. Youngman wrote:
Quote:
And aren't PKs optional in relational theory, anyway?
There are two view-points here - both sensible, and actually
equivalent. It just sounds like they differ.

View A: No, primary keys are mandatory. There has to be at least one
combination of the attributes in a relvar that uniquely identify each
tuple, and one such combination of attributes is designated as the
primary key. The other possible combinations are regarded as
alternate keys - AKs - though 'alternative keys' would be better use
of English.

View B: Yes, primary keys are optional. There must be at least one
candidate key, but even if there is more than one CK, it is not
necessary to arbitrarily designate one of them as 'the' primary key.

View A could be described as the older view point and View B as the
more recent. The net result is the same: there is at least one
combination of the attributes in the relvar which uniquely identifies
each tuple. Note that the combination might be the empty set of
attributes, in which case the relvar contains at most one tuple.

Note too that neither view says anything about indexes - they are
irrelevant (even though most systems implement unique constraints -
aka candidate keys - using an index).

I personally subscribe to View B because it does away with the need
for AKs (and PKs, come to that). Occam's Razor: Entia non sunt
multiplicanda praeter necessitatem. If you have CK's, PK's and AK's
are unnecessary.

See C J Date: Datebase - Selected Writings (probably the 1989-1991
volume, but conceivably the 1991-1994 volume).

SQL DBMS do not mandate that each SQL table has a candidate key. This
is widely regarded (especially in c.d.t) as a defect in the SQL
standard and hence in the DBMS that implement an approximation to the
SQL standard.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler (AT) earthlink (DOT) net, jleffler (AT) us (DOT) ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.