Movie Mayhem DB II
Objective
For this assignment, you will demonstrate your skills and understanding of SQL Queries and the SELECT, INSERT, UPDATE, and DELETE statements by creating queries to retrieve and manipulate data from the Movie Mayhem database.
Project Setup
1. Clone the Repository
Clone the repository from GitHub and use the provided file to complete the assignment.
2. Import the Movie Mayhem Database
To import the database, using phpMyAdmin, complete the following instructions.
- Open Adminer at http://adminer.test (macOS) or http://localhost/adminer (Windows)
- Log in to Adminer using the root username and password
- From the Adminer homepage, click on the "Import" link found on the left side of the page.
- Under the "File upload" section, click the "Choose File" button. Choose the
movie_mayhem.sql
file found in the repository. - Click the "Execute" button.
- Once the importing has been completed, the
movie_mayhem
database should be listed in the DB select box. - Once the importing has been completed, select the movie_mayhem database from the DB select box.
- With the movie_mayhem database selected, click on the "SQL command" link on the left side of the page. From this page, you can execute custom SQL commands.
Requirements
Create ONE query for each of the tasks below. Save the queries to the queries.sql
file.
movies
table with the following data:
1. Add a movie to the movie_title | director | year | genre_id |
---|---|---|---|
'WALL-E' | 'Brad Bird' | 2008 | 2 |
movies
table with the following data:
2. Using a subquery, add a movie to the movie_title | director | year | genre_title |
---|---|---|---|
'Inside Out' | 'Peter Doctor' | 2014 | 'Family' |