Specify queries a, b, c, e, f, i, and j of Exercise 8.16 in both tuple and

Question:

Specify queries a, b, c, e, f, i, and j of Exercise 8.16 in both tuple and domain relational calculus.


Exercise 8.16

Specify the following queries on the COMPANY relational database schema shown in Figure 5.5 using the relational operators discussed in this chapter. Also show the result of each query as it would apply to the database state in Figure 5.6.

a. Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ProductX project.

b. List the names of all employees who have a dependent with the same first name as themselves.

c. Find the names of all employees who are directly supervised by ‘Franklin Wong’.

d. For each project, list the project name and the total hours per week (by all employees) spent on that project.

e. Retrieve the names of all employees who work on every project.

f. Retrieve the names of all employees who do not work on any project.

g. For each department, retrieve the department name and the average salary of all employees working in that department.

h. Retrieve the average salary of all female employees.

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

j. List the last names of all department managers who have no dependents.


Figure 5.5


Figure 5.6

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Fundamentals Of Database Systems

ISBN: 9780133970777

7th Edition

Authors: Ramez Elmasri, Shamkant Navathe

Question Posted: