Question: Build the parse tree for the following queries and optimize them using the rewrite rules. Given the relations: a) SELECT startname FROM Germanmovies NATURAL JOIN
Build the parse tree for the following queries and optimize them using the rewrite rules. Given the relations:
a)
SELECT startname
FROM Germanmovies NATURAL JOIN startsin
WHERE Director = 'ABCDEF'
[note germanmovies is a view as shown below]:
CREATE VIEW germanMovies AS
SELECT *
FROM movie
WHERE language = 'german';
b)
SELECT dept_name
FROM dept, manager
WHERE Manager.DNO =Dept.DNO AND Manager.salary = 50000;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
