Movie Catalog Database Schema
Tags: database, schema, dbschema
Published: 2022-10-18 18:41:59

Today we are going to create a database schema for a movie catalog. It could be used for a web-site like IMDB or a desktop software to catalog movies.

![Movies Schema](https://dbmodeller.net/blog/assets/movies-full.png)

Our main table to store information about movies is the `Movie` table.
This table holds the main aspects of the movie like the following:

- Title of the movie
- Release date
- Run time length of the movie as minutes
- IMDB id of the movie
- MPA Rating of the movie (G, PG, PG-13, R, NC-17)

This table has a reference to `languages` table which holds the language of the movie.

![Movie Table](https://dbmodeller.net/blog/assets/movies-movies-table.png)

Next we have the `plots`, `languages` and `genres` tables. These are all colored with the same color because they hold the detail information about a movie.
The `plots` table has a many-to-one connection to the `movies` table and one-to-one connection to the `languages` table. This is because a movie can have multiple plots in different languages. The `languages` table is referenced by the `movies` table as we have mentioned above. This is for the language of the movie it self.
We have a many-to-many connection between `movies` and `genres` tables. This is because a movie could have multiple `genres`. There is a `movie_genres` table to be able to establish the many-to-many connection.

![Movie Details](https://dbmodeller.net/blog/assets/movies-plot-language-genre.png)

There are many ways to represent people associated with a movie. We could have seperate tables for directors, producers, actors and actresses and these tables could hold that persons details. However we chose to create a single `people` table to represent any person and have various _join-tables_ to represent the association of the specific person to the movie.

Any person who is not an actor/actress is represented through a record in the `people` table and a connection through directors or producers to the `movies` table. Depending on our needs, we could add `writers`, `executive_producers`, `production_managers` and many other similar tables with the same structure as `producers` and `directors` tables. A foreign key for `people` and a foreign key for `movies` is all that is needed.

To represent the actors in the database, we will do something different than `directors` and `producers`. An actor plays a character in a movie. Sometimes a character is played by different actors. For example in **X-Men: First Class (2011)**, *James McAvoy* plays the 30 year old Charles Xavier role and *Laurence Belcher* plays the young Xavier role. It is also possible that the same character is portreyed in different movies. Like in the other movies in the series, where Xavier is portraied by **Patrick Stewart**.

To be able to model this scenario where a character is not specifically tied to a movie, we have `characters` table which is associated with the `movies` table through a _join-table_.

**Note:** _The correct plural form of person is people, although you can name the `people` table `persons` if you want to keep the naming consistent._

![People](https://dbmodeller.net/blog/assets/movies-people.png)

Finally we have the `awards` table. This table would hold the list of awards (94th Academy Awards,  79th Golden Globe Awards, Palme d'Or etc). It has name and year fields of the award, however we could add, `ceremony_date`, `ceremony_location`, `presenter` and many other fields if we need them.

The `awards` table is associated with the `movies` table through the `movie_awards` table. The `category` field would hold the name of the award (_Best Picture_, _Best Actor_, _Best Supporting Actress_ etc). `won_awards` field is a boolean field that represents if the award is won or if it is just a nomination.

![Awards](https://dbmodeller.net/blog/assets/movies-awards.png)

We came to the end of our tutorial. You can open this sample movie catalog schema in dbmodeller and use it in your own projects.

[Open In DbModeller](https://dbmodeller.net/app/?open_sample=14)