Consider the following schema:


Takes(Student; Course)
Offers(Department; Course)


Write the following query in SQL: Find all students who took all their courses only in the CS
department.


Solution:


SELECT T.Student
FROM Takes T
WHERE NOT EXISTS (
( SELECT TT.Course
FROM Takes TT
WHERE TT.Student = T.Student)
EXCEPT
( SELECT O.Course
FROM Offers O
WHERE O.Department = 'CS')
)

Computer Science & Information Technology

You might also like to view...

2. A cloud provider is deploying a new SaaS product comprised of a cloud service. As part of the deployment, the cloud provider wants to publish a service level agreement (SLA) that provides an availability rating based on its estimated availability over the next 12 months. First, the cloud provider estimates that, based on historical data of the cloud environment, there is a 25% chance that the physical server hosting the cloud service will crash and that such a crash would 2 days before the cloud service could be restored. It is further estimated that, over the course of a 12 month period, there will be various attacks on the cloud service, resulting in a total of 24 hours of downtime. Based on these estimates, what is the availability rating of the cloud service that should be published

What will be an ideal response?

Computer Science & Information Technology

Here is an iterative function. Write a recursive function that does the same thing. Be sure you write the correct number of copies of the cheer, “Hip, Hip, Hurray!”. For this problem, ignore namespace issues.

``` void iter_cheers(int n) { for(int i = 0;i < n-1; i++)//this is the tricky part! cout << "Hip, "; cout << "Hurray!" << endl; } ```

Computer Science & Information Technology

The location of a caption associated with a Word object

a. Caption label b. Caption position c. AutoCaption

Computer Science & Information Technology

?At the end of the systems implementation phase, the final report to management should include _____.

A. ?final versions of all system documentation B. ?hardware efficiency and platform performance C. ?adequacy of system controls and security measures D. ?quality and effectiveness of training

Computer Science & Information Technology