CS 377 - Database Systems
Homework 3: Relational Algebra Queries 

 

Out: Thursday, September 15

Due: Thursday, September 22, 11:59pm

 

Consider the company database below and formulate a relational algebra query for each of the following questions.

  1. Find the name of the department in which "John Smith" works.
  2. Find names of departments with employees working on some project controlled by the "Research" department
  3. Find first & last names of employees who work at least 20 hours on the "ProductX" project
  4. Find first & last names of employees who work more than 40 hours in total
  5. Find the name(s) of the department(s) that pay the highest salary
  6. Find the names of the projects that are worked on by all (every single) employees in the "Research" department
  7. Find the fname & lname of employees who have more dependents than the employee "John Smith"
  8. For each department, find the department name and the total salary paid to employees in the department. (You may assume that dname is a also a key for the department relation)
  9. Find the fname & lname of employee(s) who work the highest total number of hours
  10. Find the department(s) in which all (every single) employees in the department have (at least one) dependent

 

Submission: please submit your homework as a PDF file in your cs377 directory as ~/cs377/hw3/hw3.pdf