Question
1. Write the SQL queries for the following items, considering the SQL Optimization Techniques studied in classes. a. Retrieve the name and year of the
1. Write the SQL queries for the following items, considering the SQL Optimization Techniques studied in classes.
a. Retrieve the name and year of the movies.
b. Retrieve title and language of all the English movies which were released before 1998.
c. Retrieve a list of first and last names of all the actors who were cast in the movie Titanic and the roles they played in that production.
3. Consider the following database schema:
Movie (movieID,title, length, year)
Studio (movieID, studioName)
a. Write down the query to find the titles and years of movies made by FOX that are at least 100 minutes long.
b. Show the initial query tree.
movie cast integer actor act_id mov_id role integer char (30) genres gen_id act_id act_fname act_Iname act_gender integer char (20) char (20) char (1) integer char (20) gen_title movie director dir_id dir_fname dir_lname integer char (20) char (20) Ymov_id integer mov_title char (50) mov_year integer mov_time integer mov_lang char (50) mov_dt_rel date mov_rel_country char (5) movie_genres movid gen_id integer integer reviewer movie_direction dir_id movid rating mov_id integer rev_id integer rev_stars integer num_o_ratings integer 18 rev_id integer integer integer char (30) 8 rev nameStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started