December
1998 QUESTION 3 Total Marks: 20 Marks |
Click here to access other
questions
Click to access
|
The following tables represent data stored by a
University department, about students, faculty, classes taught and enrolment for those
classes. |
||
(a) | Write an SQL query to obtain a list of course
numbers for all those courses which have students enrolled.
|
[2] |
(b) | The secretary of the Maths
department needs to know the names of all students who are majoring in Maths who have more
than 30 credits. Write an SQL query to give her this information.
|
[3] |
(c) | It has been agreed that Professor
Tanaka will teach all of his courses in room B220. Write an SQL statement to change the
relevant tables.
|
[4] |
(d) | Write an SQL query to find out the
course numbers of all courses which are taught by Byrne of the Maths department.
|
[5] |
(e) | Find the name and id of the student
(or students) who has the largest number of credits.
|
[2] |
(f) | If a course has fewer than three
students enrolled, it will cancelled. Write an SQL query to find out the course numbers of
any courses that might be affected by this.
|
[2] |
(g) | What do you understand by QBE? Why might QBE be easier to use than SQL? | [2] |