A Question On Many-To-Many Linking Table(s)
Date: 22 Sep 2002 08:45:32 -0700
Message-ID: <a68a4ee0.0209220745.4442210e_at_posting.google.com>
Hi all,
I'm learning database design by myself, and I have a newbie question about the following relationship:
Table "Composers" composer_id (primary key) Table "CDs" cd_id (primary_key) Table "Performers" performer_id (primary key)
Many composers produce many cds, and many cds can have many composers. (Many-to-many). Also, many cds can contain many performers, and many performers can produce many cds.
According to some of the database books I have, they say that many-to-many implies a linking table(s).
Then I came up with the following linking table, but is this a good approach to design the database?
Table "Comp_CD_Peform" composer_id (foreign key) cd_id (foreign key) perform_id (foreign key)
What I would like to do is search for a composer and his or her corresponding cds, or cds produced (performed) by certain performers.
Thanks in advance,
alea
PS
Also, if anyone could recommend a few practical and/or hands-on
database design books, I would also appreciate your help.
Received on Sun Sep 22 2002 - 17:45:32 CEST