Question about "linking tables"

From: Kevin Porter <kporter_at_roux.com>
Date: Fri, 18 May 2007 23:01:01 -0600
Message-ID: <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 Received on Sat May 19 2007 - 07:01:01 CEST

Original text of this message