Reputation: 11
I am creating database for entertainment application. In this movies,video songs,mp3 songs like entities are included. In this movie & actors,actresses,music directors,male singers, female singers have many to many relationships. i.e. an actor works in zero or many movies & a movie includes one or many actors. so my question is how to make these tables.
Upvotes: 1
Views: 1467
Reputation: 454912
Your actor
table would look like:
[ actorID Name Age....]
Your movies
table could look like
[ movieID Name release_date....]
where actorID
and movieID
are primary keys. Now the many-to-many relationship between them can be represented as another table say starring
as:
[ movieID actorID ]
a row in this table implies that the movie with the given ID has the actor with actorID in that row as a star.
Upvotes: 0
Reputation: 65361
For example:
Actor Table:
Film Table:
The Connection Table ActorFilm
Upvotes: 1