Coursework 6 (Optional! You do not have to do it if you you did
all the other exercises!)
The exercise is based on lecture 17 (views and privileges).
Exercise
Create a file cw6.sql containing SQL statements to do the following:
- Drop view Movie80 from the database;
- Create a view Movie80 which is derived from nza.Movie and nza.Director
and has columns Director.Name, Title and Year for all the films in nza.Movie
which were released between 1980 and 1989 inclusive.
- Grant SELECT privileges on this view to every user of the database.
- as a comment in the same file, say which SQL statement I (user nza) should
use in order to grant you SELECT privileges on the table nza.Actor.
- as a comment in the same file, say which SQL statement I (user nza) should
use in order to revoke SELECT privileges from you on nza.Actor.
Model output