Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relations: Movie (Title, Year, Rating, StudioName) Studio (Name, Country, Address) Assume each movie is produced by just one studio, whose name is

image text in transcribed

Consider the following relations: Movie (Title, Year, Rating, StudioName) Studio (Name, Country, Address) Assume each movie is produced by just one studio, whose name is mentioned in the StudioName attribute of the Movie relation. Attributes Title and Name are primary keys for relations Movie and Studio, respectively. Attribute StudioName is a foreign key from relation Movie to relation Studio. Attribute Rating shows how popular a movie is and its values are between 1-10. The following statistics are available about the relations Movie T(Movie) 24000 V(Movie,StudioName)-800 V(Movie,Rating)-10 Studio T(Studio)- 1000 The following query returns the movies with a rating of 10 produced in each country after 1990. SELECT Country, Title FROM Movie, Studio WHERE Movie.StudioName - Studio.Name and Year > 1990 and Rating -10 Suggest an optimized logical query plan for the above query. Then, estimate the size of each intermediate relation in your query plan. By an intermediate relation, we mean the relation created after each selection or join Consider the following relations: Movie (Title, Year, Rating, StudioName) Studio (Name, Country, Address) Assume each movie is produced by just one studio, whose name is mentioned in the StudioName attribute of the Movie relation. Attributes Title and Name are primary keys for relations Movie and Studio, respectively. Attribute StudioName is a foreign key from relation Movie to relation Studio. Attribute Rating shows how popular a movie is and its values are between 1-10. The following statistics are available about the relations Movie T(Movie) 24000 V(Movie,StudioName)-800 V(Movie,Rating)-10 Studio T(Studio)- 1000 The following query returns the movies with a rating of 10 produced in each country after 1990. SELECT Country, Title FROM Movie, Studio WHERE Movie.StudioName - Studio.Name and Year > 1990 and Rating -10 Suggest an optimized logical query plan for the above query. Then, estimate the size of each intermediate relation in your query plan. By an intermediate relation, we mean the relation created after each selection or join

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions