Question: 18 18 movie_cast act_id mov_id role integer integer char (30) actor act_id act_fname act_Iname act_gender integer char (20) char (20) char (1) genres Y gen_id



18 18 movie_cast act_id mov_id role integer integer char (30) actor act_id act_fname act_Iname act_gender integer char (20) char (20) char (1) genres Y gen_id gen_title integer char (20) movie director dir_id dir_frame dir_lname integer char (20) char (20) Ymovid 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 mov_id gen_id integer integer rating reviewer movie_direction dir_id mov_id integer rev_id integer rev_stars integer num_o_ratings integer integer integer 18 18 y rev_id rev_name integer char (30) mov_id 2. Write the SQL queries for the following items, considering the SQL Optimization Techniques studied in classes. 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. C. Consider the following four queries specified on Movie database: SELECT A.act_lname 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' C.1. Draw the initial query tree of this query, then draw the resulting query trees after the applications of the following heuristic optimization query steps (Ch 19, Textbook) c.2. Moving SELECT operations down to the query tree. C.3. Applying the more restrictive SELECT operation first
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
