0

I have a school project in which I have to design a database and my theme is Movie database of sorts. I created a basic ER diagram and I will post a picture here so you can tell me where are my mistakes (I know I have a lot of those)... I also want to add some new entities like "Genre" but I have a M:M relationship between "Movie" and "Genre" and I'm not sure if I can leave a M:M relationship in a ER diagram. Any advice about what am I doing wrong or how to implement "Genre" entity would be helpful. enter image description here

0

1 Answer 1

2

Can a Movie have > 1 director (like the Marvel movies and the brothers), if so this should be a many to many.

Can a movie win more than one award? If so it should be a many to many.

Can a move EVER be shot at > 1 studio? If so you need a many to many.

You solve the many-to-many by adding an intermediate table in the logical design phase. That new table has a composite key consisting of the foreign keys from the two tables participating in the relationship.

For example, for Movie and Director, you would have Move, MovieDirector, and Director. MovieDirector would have only 2 columns: MovieID and DirectorID.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.