Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

Students also viewed these Databases questions