G51DBS 2008-2009 Coursework 3
This coursework mostly uses material in lectures 7 and 8.
Database
This time you will not create a database yourself, but use an existing
one. I gave you "read only" (that is, SELECT but not UPDATE)
privileges on my tables: nza.Actor, nza.Director, nza.Movie
and nza.Part. You can see what are the column names in, for example, Actor,
using DESC nza.Actor at the sqlplus prompt. When you are writing
queries and don't want to type e.g. nza.Actor all the time, alias it as A
or something else short.
Exercise
Create a file cw3.sql containing SQL statements which answer the following
queries:
- Names of all directors
- Names of all female actors
- Names of actors in a movie with title Scarface
- Titles of movies where Alec Guinness played a part
- Names of actors who were in a movie directed by Alan Parker
Submission and marking
We will try to mark this exercise in the lab, again just by looking at
your cw3.sql file and checking the output. Model output
is here: all queries .
Whether we have time to mark it in the lab or not, please submit via
cw
as well, coursework id is 189. The deadline is 6 March at 23:59.