De?ne the above query as an SQL view and then use this view to answer the following query: For each student who has taken a course from every professor in the MUS Department, show the number of courses taken, provided that this number is more than 10.

What will be an ideal response?

```
CREATE VIEW Musician(StudId) AS
SELECT R.StudId
FROM Transcript R
WHERE NOT EXISTS (
(SELECT P.ProfId
FROM Professor P
WHERE P.Dept = ’MUS’)
EXCEPT
(SELECT T.ProfId
FROM Teaching T
WHERE T.CrsCode = R.CrsCode
AND T.Semester = R.Semester))
```

A query that uses Musician:

```
SELECT M.StudId, COUNT (*)
FROM Musician M, Transcript T
WHERE M.StudId = T.StudId
GROUP BY M.StudId
HAVING COUNT(*)>10
```

Computer Science & Information Technology

You might also like to view...

Does a PKI perform encryption? Explain your answer

What will be an ideal response?

Computer Science & Information Technology

Case-Based Critical Thinking QuestionsCase 5-1Stacy is in the process of organizing the files and folders on her computer. Stacy has finished organizing her computer. She is concerned that her files are not completely organized in the correct folders. Stacy has decided to create three new subfolders and needs to make duplicates of her files. Stacy needs to ____.

A. cut and paste her files to the new folders B. copy and paste her files to the new folders C. delete the files and then move them from the Recycle Bin D. copy her files to a flash drive

Computer Science & Information Technology