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...

To call a Web service, you must create a Web ____ as shown in the accompanying figure.

A. link B. entry C. directory D. reference

Computer Science & Information Technology

When specifying values for positioning, you may use either pixels or percentages

Indicate whether the statement is true or false

Computer Science & Information Technology

The search efficiency for the sentinel search is basically the same as for the sequential search.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The utility that rearranges files that are broken into small pieces is called a(n) ________.

a. disk-checking utility b. file system c. disk cleanup utility d. disk defragmenter

Computer Science & Information Technology