Re: foundations of relational theory?

From: Anthony W. Youngman <thewolery_at_nospam.demon.co.uk>
Date: Thu, 30 Oct 2003 00:40:15 +0000
Message-ID: <e32EkRHv3Fo$Ew1Z_at_thewolery.demon.co.uk>


In article <3E4nb.30655$ao4.59215_at_attbi_s51>, Marshall Spight <mspight_at_dnai.com> writes
>"Anthony W. Youngman" <thewolery_at_nospam.demon.co.uk> wrote in message news:gHbL4
>mIk0Gn$EwYg_at_thewolery.demon.co.uk...
>> >Agility is enhanced by the fact that some of the more complex
>> >possibilities for data models, such as many-to-many relationships,
>> >are simply excluded.
>>
>> NOT AT ALL. many-to-many is easy. You need a table specifically to store
>> foreign-key pairs, we just store the foreign keys directly with the
>> entity (because we can shove a list of foreign keys into what relational
>> would call a "cell"). Each entity manages its own one-to-many list (the
>> LHS *must* be one, because it's an individual entity :-)
>
>That's not a many:many relationship, though; that's a pair
>of one:many relationships. IIUC, you don't have a way to
>automatically manage keeping them in sync. It's also
>redundant.
>
In which case we only store it in one "table", and use an index to go the other way ...

If we have a FIELD called PARENTS in our PERSON file, this is the obvious thing to do, then we get a list of children by reading the PARENT index :-)

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
Received on Thu Oct 30 2003 - 01:40:15 CET

Original text of this message