diff_months: 16

Writing the several SQL queries on a relational Movie Database

Download Solution Now
Added on: 2023-01-24 04:51:38
Order Code: 484494
Question Task Id: 0
  • Country :

    Australia

Question 1. Write the SQL code to create the table structures for the entities shown in Figure1. The structure should contain the attributes specified in Figure1. Use data types that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the diagram.

Question 2. The following tables provide some example data that will be inserted into the database. Write the INSERT commands necessary to place the following data in the tables that were created in Question 1. Alternatively provide the text files (copy and pasted into your final report) and the open/insert from file commands.

For the questions 3-12, use the tables created in question1 and the data inserted in question2.

Question 3. Write a command in SQL to find the year when the movie “American Beauty” released.

Question 4. Write the SQL command to find the name and year of the movies that contain the word “the”.

Question 5. Write a query in SQL to return the name of all reviewers and name of movies together in a single list.

Question 6. Write a query in SQL to find the movies which was released before 1990.

Question 7. Write a query in SQL to find the name of all reviewers who have rated 4 or more stars to their rating.

Question 8. Write the SQL command to list the names of the actors who did not play a role in the movie Avatar. Sort the output by movie title.

Question 9. Write the SQL command to find the titles of all movies that have more than two reviewers.

Question 10. Write the SQL command to find the movie title, and the total number of actors that appeared in that movie and arrange the result according to the number of actors in descending order.

Question 11. Update the director table to set the values in DETAIL_RETURNDATE to include a date of birth (dob) component and correct some of the name mistakes. For those not listed, assume the original name is correct, and give a null value for dob. Make each entry match the values shown in the following Table.

  • Uploaded By : Katthy Wills
  • Posted on : January 24th, 2023
  • Downloads : 0
  • Views : 151

Download Solution Now

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more