Re: Question about "linking tables"

From: David Cressey <cressey73_at_verizon.net>
Date: Sat, 19 May 2007 10:46:41 GMT
Message-ID: <lAA3i.7614$xu.7299_at_trndny07>


"Kevin Porter" <kporter_at_roux.com> wrote in message news:79pv43lp1qag288p8k01veob9vuv99v4ub_at_4ax.com...
>
>
> Folks,
>
> I have a theory question regarding relational databases and linking
tables:
>
> I saw an example where there were three tables, Books, Authors, and
Categories,
> each with a sequential ID for a primary key.
>
> Now instead of having a field in Books that pointed to the foreign key in
> Authors, they had a linking table that had just the foreign keys listing
the
> relationship between all the items in both tables. Then they had the same
kind
> of table between Categories and Books, just with the foreign keys in it.
>
> So what is the advantage of having the linking table instead of the two
foreign
> keys directly in the Books table? Is it easier for the users? Or is
there
> database theory at work that I don't understand?
>
> Thanks - Bob
>

Linking tables permit many to many relationships.

If you put a foreign key for the author in the Book table, what would you do when two authors collaborate on one book? Received on Sat May 19 2007 - 12:46:41 CEST

Original text of this message