Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(c) Describe the relation that would be produced wy relational calculus (10 poin

ID: 3600496 • Letter: #

Question

(c) Describe the relation that would be produced wy relational calculus (10 points). the tollowing tuple Room(e (Room)) osidethe following class database schema: (30 Points) dents (stuNo, fName, IName, address, DOB, sex, depNo) Department (depNo, depName) Instructor (instructorNo, depNo, Name, IName) Class (classNo, className, instructor No, depNo) Registration(StuNo, classNo, semester) yOn (stuNo, classNo, dateStudied, hoursStudied) Formulate the following queries in SQL 5.1 List all details of students who are female (5 Points) List all student names who study in the CS departme 5.2. the database class. (10 Points)

Explanation / Answer

[5.1]

SELECT *
FROM Students
WHERE sex like 'female';

[5.2]

SELECT *
FROM Students
WHERE deptNo = (SELECT deptNo
                                FROM    Department
                                WHERE depName like 'CS' AND deptNo IN (SELECT deptNo
                                                  FROM    Class
                     WHERE className like 'database'
                                          ))