Consider the Movie Stars database that contains the following relations: StarsIn(movieTitle, movieYear, starName) MovieStar(Name, address, gender, birthdate) The underlined columns are the primary keys and starName in the StarsIn table is a foreign key that references the primary key Name in the MovieStar table. For the following SQL query: SELECT movieTitle FROM StarsIn, MovieStar WHERE starName = Name and address LIKE ‘%Los Angeles%‘; Suppose there are no indexes in the database and both relations are stored in heap files. Write an efficient relational algebra expression (logical plan) that is the equivalent to this query and give a physical plan for this expression (choose the algorithm to implement each operation). Justify your answer. Hint: this is an open-ended question and you may justify your answers using any valid assump- tions. Please give detailed solution.
Consider the Movie Stars
StarsIn(movieTitle, movieYear, starName)
MovieStar(Name, address, gender, birthdate)
The underlined columns are the primary keys and starName in the StarsIn table is a foreign key that references the primary key Name in the MovieStar table. For the following SQL query:
SELECT movieTitle
FROM StarsIn, MovieStar
WHERE starName = Name and address LIKE ‘%Los Angeles%‘;
Suppose there are no indexes in the database and both relations are stored in heap files. Write an efficient relational algebra expression (logical plan) that is the equivalent to this query and give a physical plan for this expression (choose the
Hint: this is an open-ended question and you may justify your answers using any valid assump- tions.
Please give detailed solution.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 7 images