Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A company that provides a movie-streaming subscription service has asked you to develop a relational database to store information on movies to answer customer questions.

A company that provides a movie-streaming subscription service has asked you to develop a relational database to store information on movies to answer customer questions. Each entry in the database contains the following items: Movie ID (the primary key), movie title, year made, movie type, MPAA rating, starring actor #1, starring actor #2, actor #3, and director. Movie types are action, comedy, family, drama, horror, science fiction, and western. MPAA ratings are G, PG, PG-13, R, NC-17, and NR (not rated). Using MySQL, develop a database, tables, and data by following these steps:

Install MySQL including MySQL Server and MySQL Workbench

Use MySQL Workbench and the default schema to create the following tables.

Create a new table named "movies" containing the following fields: movie_id, movie_title, year_made, movie_type, mpaa_rating, actor_1, actor_2, actor_3, and director. Choose a data type of float for Movie_ID. Choose a data type of varchar for all other fields. Set movie_id as the primary key.

Create a new table named "movie_types" containing the following field: movie_type. Choose a data type of varchar. Set movie_type as the primary key. Create a foreign key on movie_type that references the same field in the movies table.

Create a new table named "mpaa_rating" containing the following field: mpaa_rating. Choose a data type of varchar. Set mpaa_rating as the primary key. Create a foreign key on mpaa_rating on mpaa_rating that references the same field in the movies table.

Enter the following data into the "movie_types" table: action, comedy, family, drama, horror, science fiction, and western.

Enter the following data into the "mpaa_ratings" table: G, PG, PG-13, R, NC-17, and NR.

Enter 10 movies of your own choice into the "movies" table.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

What did they do? What did they say?

Answered: 1 week ago