Docsity

COP 4540-U01 Homework 3: Database Queries - Prof. Shu-Ching Chen, Assignments of Database Management Systems (DBMS)

Toggle sidebar
bg1
COP 4540-U01 Homework 3
Spring 2008
Due date: March 3, 2007 (Monday) in Class.
Problems:
1. [Exercise 6.16] Specify the following queries on the database schema shown in Figure
5.5 using the relational operators (relational algebra) discussed in this chapter. Also show
the result of each query if applied to the database of Figure 5.6.
(a) Retrieve the names of employees in department 5 who work more than 10 hours per
week on the 'ProductX' project.
(b) List the names of employees who have a dependent with the same first name as
themselves.
(f) Retrieve the names of employees who do not work on any project.
(g) For each department, retrieve the department name, and the average salary of
employees working in that department.
(h) Retrieve the average salary of all female employees.

Partial preview of the text

Download COP 4540-U01 Homework 3: Database Queries - Prof. Shu-Ching Chen and more Assignments Database Management Systems (DBMS) in PDF only on Docsity!

COP 4540-U01 Homework 3

Spring 2008

Due date: March 3, 2007 (Monday) in Class. Problems:

1. [Exercise 6.16] Specify the following queries on the database schema shown in Figure 5.5 using the relational operators (relational algebra) discussed in this chapter. Also show the result of each query if applied to the database of Figure 5.6. (a) Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project. (b) List the names of employees who have a dependent with the same first name asthemselves.

(f) Retrieve the names of employees who do not work on any project. (g) For each department, retrieve the department name, and the average salary ofemployees working in that department.

(h) Retrieve the average salary of all female employees.