I’m sure my terminology is wrong, which is probably the reason google isn’t helping me. Anyways here is my problem and maybe you can deduce what my real question is…I hope
Ok let’s say I have a table called MOVIE this table has the values (columns?) for Name, ReleaseDate and Staring now my issue is how do i have the Staring value contain multiple values?
Do I make a separate table STARS with the columns Key, Actor1, Actor2 etc…? Where the Staring value from the MOVIE table points to the PK of the STARS table.
Key | Actor 1 | Actor 2 | …..
———————————-
01 | Bob Bob | John Bob | …….
02 | Jim Bob | John Bob | …….
However, The problem with this is that the table would be static and will need to have a preset number of actors.
OR
Is there a way to store multiple actorID’s (PK’s from the Actors table) in the Staring values from the MOVIE table? for example:
Name | ReleaseDate |
Staring
————————————-
blah | 1999 | 21, 46, 392, 182, 30
blah pt2 | 2001| 3, 11, 412
Anyways anything will be of help at this point and will be greatly appreciated.
In this kind of situation, you generally use 3 tables :
Here, it would mean :
And, to get a movie :
And to get the actors in that movie :
And you can even join to the movies table, if needed 😉
A couple of keywords :