Movie Relational Database

This project serves as a testament to my proficiency in relational database design and SQL. It showcases my ability to translate complex data requirements into well-structured relational databases, create Entity-Relationship (ER) models, and efficiently manage database privileges.

Highlights:


The Dataset

I have chosen a set of four different datasets, based on Movies and TV shows, involving four different hosts, being Netflix, Amazon Prime, Hulu and Disney.

All four of these datasets are of the same format, and consist all the Movies and TV series that are being hosted by these hosts up until the year 2021. The datasets illustrate the names, directors, actors, genres, hosted country, show release date, duration, rating and a short description for each of their Movies / TV Shows.

I was able to concatenate these four datasets into one. Which gives us the base dataset we will work from, which will be in the structure of appendix A.

Appendix A: Snippet of original concatenated dataset

table

We will be using most entities from the original dataset, which is currently modelled as illustrated in appendix C.

Appendix C: ER diagram of original dataset

table

ER Modeling

Currently our data is in no Normal Form, and all data is presented in a single entity, indicated in appendix C.

Modeling cardinality from our normalised model, as well as identifying what our Primary and Foreign keys would be, illustrated in appendix F1. This model would be straight forward to implement into an SQL Database, as illustrated in appendix G.

Appendix G: ER model showing cardinality and PK’s / FK’s

table

Building database

In this stage we will be creating our SQL database, and illustrate how we populate as well as query our database for answering our predefined questions.

Building the MySQL database

table table table table table table

Creating privileges

table table

Optimising database

table

Querying the database

Here we will state what queries we would use for our node application when gathering answers to our predefined questions.

Question 1

Which host played the most Movies / TV shows from a specific director in a specific date range and country.?

table

Question 2

What genres are most common from a specific host in a specific date range and country.?

table

Question 3

What are the latest Movies / TV shows hosted by a specific host in a specific country.?

table

Full report in PDF