My design is a Netflix clone which has movies and shows just like Netflix. There is also a table called transcodes
which will have information on a movie or episode video transcode.
My problem is, I don't know how the I should connect the transcodes
table to the movies
and episodes
table. I thought about having a movie_id
and episode_id
foreign key in transcodes
but then I was struggling with coming up with the query. I think adding a transcode_id
to the movies
and episodes
tables could work, but I feel there is a more efficient way of handling it.
What would be the best way to connect transcodes
to the movies
and episodes
tables?
Maybe my design is bad? If anyone sees any possible improvements, I would appreciate feedback on that as-well.
- EDIT -
I've updated my design to reflect the feedback. The only question I have is, some tables have both movie_id
and show_id
which means one of those will always be NULL
, is that bad design? Or is that acceptable? Also, take a look at the titles_posters
table. Something seems a little off about how everything is associated, seems like there will be quite a bit of nulls as-well, but maybe that is fine?