Re: Uniqueness, NULLs and design options

From: Steve Long <steven.long_at_erols.maps_on.com>
Date: Wed, 30 May 2001 17:38:46 -0400
Message-ID: <9f3pc1$r2g$1_at_bob.news.rcn.net>


either will work. which approach selected depends on the nature of the application and how it interacts with the data.

"ks" <usenet_spam_at_online.no> wrote in message news:3b1103ed.22595851_at_news.online.no...
> Three tables; articles, authors and the intermediary table
> article_authors linking the two first in a many-to-many relationship.
>
> Now, an article may have several authors. BUT only one "main" author
> who gets most of the credit. And the articles are ordered
> alphabetically by this authors name in the physical archives.
>
> Now, should I add another column to the article table - pointing
> directly to the one main author. That means two parallel relationships
> between articles and authors.
> Or, is there a way of enforcing one single "main" author in the
> intermediary table by adding a column ? The table would then have
> author_id, article_id and main. Most rows would have a NULL, but for
> each article there must be ONE author flagged as "main" - no more, no
> less.
Received on Wed May 30 2001 - 23:38:46 CEST

Original text of this message