Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Specify the following queries on the COMPANY relational database schema using relational algebra operators. Also show the result of each query as it would apply

Specify the following queries on the COMPANY relational database schema using relational algebra
operators. Also show the result of each query as it would apply to the database state of Figure 1.
6 pts per problem (4 pts for relational algebra query and 2 pts for resulting relation)
1) Retrieve the first and last names of employees that work in department 1 or department 5.
2) Retrieve the names of all departments with a location in Houston.
3) Retrieve the SSNs of all employees that work more than 20 hours per week on project number 30.
4) Retrieve the first and last names of employees in department 4 who work more than 15 hours per
week on the 'Newbenefits' project.
5) Retrieve the first and last names of employees that are directly supervised by James Borg.
6) For each project, list the project name and the number of employees that work on the project.
7) Retrieve the SSNs and first names of employees who work on every project.
8) For each department, retrieve the department name, and the average salary of employees working
in that department

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions

Question

Write a parallel java program that prints 1 0 0 0 random numbers.

Answered: 1 week ago

Question

Employ effective vocal cues Employ effective visual cues

Answered: 1 week ago