Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. W e SOL Queries for the following terms, considering the SOLO Retrieve and guage of the English movies which wer e 2. W T

image text in transcribed
image text in transcribed
image text in transcribed
1. W e SOL Queries for the following terms, considering the SOLO Retrieve and guage of the English movies which wer e 2. W T SOL for the following terms, conseghe SOLO u died classes the actors who have me d Find how each one 2000 FROM A AND C ANDA 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 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 act id movid role Integer integer char (30) Pact id act fname act name act gender integer char (20) char (20) char (1) gen_id gen_title integer char (20) movie director movie genres dirid dir frame dir_name integer char (20) char (20) Ymov id integer mov title char (50) mov year integer mov time integer mon lang mov dt rel mov_rel_country char (5) movid gen id char(50) move direction revid integer dir id movid Integer integer rev stars num o ratings integer rey name char (30) 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. 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_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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions