Slideshow:
SELECT fname, dno
FROM employee, department
WHERE dnumber = dno
AND birthday LIKE '%1960'
|
Query can have semantical errors:
|
|
CREATE VIEW Paramount_Movies AS
(SELECT title, year
FROM Movies
WHERE StudioName = 'Paramount')
|
The SELECT query is equivalent to the following logical query plan:
|
SELECT title
FROM Paramount_Movies // Virtual table !!
WHERE year = 1979
|
The Query Processor will first parse the query and create the following logical query plan:
|
Then, the SQL query preprocessor will replace the virtual table with its corresponding logical query plan:
|