Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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

image text in transcribed

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 c.2. Moving SELECT operations down to the query tree. c.3. Applying the more restrictive SELECT operation first

18 18 movie_cast act_id mov_id role integer integer char (30) genres 7 gen_id actor Y act_id act_fname act_Iname act_gender integer char (20) char (20) char (1) integer char (20) gen title movie movie_genres director dir_id dir fname integer char (20) char (20) mov 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) mov_id gen_id integer integer dir_lname rating movie_direction mov id integer rev_id integer rev_stars integer num_o_ratings integer dir_id mov_id integer integer reviewer revid rev_name 81 81 integer char (30)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions