Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following Movie database for Question 1-2: actor act_id act_fname act_Iname act_gender director dir_id dir_fname dir_Iname movie_direction dir_id mov_id integer char (20) char
Consider the following Movie database for Question 1-2: actor act_id act_fname act_Iname act_gender director dir_id dir_fname dir_Iname movie_direction dir_id mov_id integer char (20) char (20) char (1) integer char (20) char (20) integer integer 18 18 movie_cast act_id mov_id role movie integer integer char (30) mov_id mov_title mov_year integer char (50) integer integer char (50) mov time mov_lang mov_ dt_rel date mov_rel_country char (5) reviewer rev_id integer rev_name char (30) genres gen_id gen_title movie genres mov_id gen_id rating mov_id rev_id rev_stars integer char (20) integer integer integer num_o_ratings integer integer integer 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. 2. Write the SQL queries for the following items, considering the SQL Optimization Techniques studied in classes. c. Consider the following query specified on Movie database: SELECT A.act_Iname FROM actor A, movie_cast C, movie M WHERE M.mov_title = 'Titanic' AND M.mov_id = C.mov_id AND A.act_id = C.act_id AND A.act_gender = 'M' a. List all the actors who have not acted in any movie between 1990 and 2000. b. Find how many movies are there in each genre. 18
Step by Step Solution
There are 3 Steps involved in it
Step: 1
a Required query select movtitle as MovieTitle movyear as ReleaseYear from movie sample outp...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