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:
  1. Drop view Movie80 from the database;
  2. 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.
  3. Grant SELECT privileges on this view to every user of the database.
  4. 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.
  5. 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