Answer the following queries using relational algebra:

Consider the following relational schema, where the keys are underlined:

Employee ( ssn, name, gender, address, salary, supervisorSSN, dnumber )
Department ( dnumber, dmname, managerSSN)
DeptLocation ( dnumber, dlocation)
Project (pnumber, pname, plocation)
WorksOn (emplSSN, pnumber, hours)

(a) Retrieve the names of all male employees in department number 666, who work more
than 13 hours per week on project "Catch 22".
(b) Find the names of employees who are two managerial levels below the employee "Joe
Public".
(c) Find names of the department that have no employees.
(d) Find those employees in department number 123 who do not work on any project at
location NYC.

(a) name( dnumber=666 AND gender=0male0(Employee) ./ssn=emplSSN

(pname=0Catch220(Project) ./ hours>13(WorksOn)) )

(b) name( Employee ./supervisorSSN=ssn (Employee ./supervisorSSN=ssn2 name2=0JoePublic0

(Employee[ssn2; name2; gender2; address2; salary2; supervisorSSN2; dnumber2]) )

(c) dmname(Department) dmname(Department ./ Employee)

(d) name(dnumber=123(Employee)) name( dnumber=123(Employee) ./ssn=emplSSN

(plocation=0NYC0(Project) ./ (WorksOn)) )

Computer Science & Information Technology

You might also like to view...

The default font size in OpenOffice Writer is ________ points

A) 8 B) 10 C) 12 D) 14

Computer Science & Information Technology

Using the Python interactive shell, put the elements of the list you instantiated in exercise 3 in alphabetical order.

What will be an ideal response?

Computer Science & Information Technology