Question:
The following relational database schema corresponds to a part of a database used by the Registry Department of a university.
DEPARTMENT (d#, d-name, head-of-dept)
MODULE (m#, m-name, m-level, d#)
CANDIDATE (c#, c-name, c-address)
RESULT (c#, m#, cw-grade, exam-grade, final-grade)
The following explanations are given for this schema:
(i) d# represents department number, m# represents module number, and c# represents candidate number;
(ii) d-name represents department name, m-name represents module name, and c-name represents candidate name;
(iii) each module is run by a particular department;
(iv) each module has a particular level associated with it, indicated by its m-level (level 1, level 2, or level 3);
(v) results achieved by a candidate for a particular module are recorded as coursework grade (cw-grade), exam grade (exam-grade) and overall grade (final-grade). The highest grade is 16.
Express the following queries firstly in Relational algebra and secondly in Relational Calculus:
(i) Find the names and numbers of those candidates who have achieved one or more final grade between 11 and 16.
(ii) Find the candidate number, module number and final grade for those candidates attending modules run by the departments named ‘Business' or ‘Computing'.
(iii) Find the numbers of those candidates who are not attending any level 3 module run by the department named ‘Computing'.
(iv) Find the numbers of those candidates who are attending all level 3 modules run by the department named ‘computing'.