Question: Exercise 4.1 What is the difference between a relational algebras operations degree and arity? Give an example where an operation is applied such that these

Exercise 4.1

What is the difference between a relational algebras operations degree and arity? Give an example where an operation is applied such that these two differ!

Exercise 4.2

Are the following relational algebra operations a complete set?

{ , ,, , ,} Prove your answer! (Hint: You can use the fact that { , ,, , ,} is a complete set, without

proving it)

Exercise 4.3

Express a NATURAL JOIN between the two relations WORKS_ON and PROJECT of Figure 5.5 in relational algebra only using operations from the complete set { , ,, , ,} (join between the Pno attribute of WORKS_ON and the Pnumber attribute of PROJECT).

The two relations are given in the Figure below.

Exercise 4.4

Solve the books Exercise 8.16 (page 281). For your convenience here it is copied:

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

(c) Find the names of employees that 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 employees who work on every project.

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

(i) Find the names and addresses of 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 department managers who have no dependents.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!