Jump to content

Advice on MySQL table set-up wanted...


Maracles

Recommended Posts

Hi, i'm creating a database that will in part need to list movies and the actors involved in those movies.

 

My plan is to put all 'talent' (Actors, Directors) in a 'talent' table with each person having their own unique talentID. Simultaneously I will have a table that lists all movies with titleID.

 

Each film however will have multiple people attached to it (since all films have more than one actor/actress) and I am unsure of the best way to link all the relevant people to a single film (titleID). Obviously it would be inefficient to create a new column for each individual for a film, how else could this be done?

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/180019-advice-on-mysql-table-set-up-wanted/
Share on other sites

Hi,

 

This is what i would do.

 

 

Hope this makes sens to you ?

 

talents ( talent_id , talent_firstname, talent_lastname) -- 1 row

 

movies (movie_id, movie_description, movie_year) -- 1 row

 

castings (casting_id , talent_id , movie_id) -- multiple rows

 

Regards,

 

Rob.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.