I think i only need 2 table is enough
CREATE TABLE programs
(
programid int NOT NULL PRIMARY KEY,
programname nvarchar(200) NOT NULL,
... )
CREATE TABLE productioncrew
(
programid int NOT NULL REFERENCES programs,
firstname nvarchar(200) NOT NULL,
lastname nvarchar(200) NOT NULL,
role nvarchar(200) NOT NULL,
PRIMARY KEY (programid, firstname, lastname, role)
)
since my DB is only 6 tables like Schedules, TVStations,
ChannelLineup, Programs, ProductionCrews and Genres
it's a very small DB and I dont' need all those ID things it's easy to
do query with above
>>crew -> programID -> member
>
>your main table would have three fields, plus extra info about
>members.
>
>crewid : programid: memberid:
>
>you would also have a table with info about crews indexed by crewid
>and crew name
>
>You would also have a table of info about programs indexed by program
>name and program id.
>
>If you had just a small database, you might dispense with crewids and
>programids and just use the names as keys.


|