CMSC661 - Homework Assignment 4

Due November 14 beginning of class

(Late homework will not be accepted; all homework must be done independently)

Following problems are from Ullman Text.

Page 368: 6.1
Page 369: 6.2
Page 370: 6.12
Page 372: 6.26
Page 374: 6.38

Problem: Consider the relational database given below. For each of the following queries, give expression in the relational algebra, tuple relational calculus, domain relational calculus, and SQL statements.

EMPLOYEE(ssn, name, address, salary, bdate, dnumber)
DEPARTMENT(dname, dnumber, mgrssn)
DEPT-LOCATIONS(dnumber, dlocation)
PROJECT(pname, pnumber, plocation, dnumber)
WORKS-ON(essn, pnumber, hours)

a.    Find the names of all employees in department 5 who work more than 10 hours per week on the 'MobileMultimedia' project
b.    Find the names of all employees who are directly supervised by 'Jane Smith'.
c.    Find the names of all employees who work on every project.
d.    Find the names of all employees who do not work on any project.
e.    Find the names and addresses of all employees who work on at least one project located in Houston but whose department has no location in Houston.