Starting from:

$24

CS6360.001– Quiz 2 Solved

Use COMPANY database schema and specify following queries in relational algebra.

 

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

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

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

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

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

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

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

Retrieve the average salary of all female employees.
 

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.
 

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

 

***

COMPANY Database Schema

 

Employee (FName, LName, SSN, BDate, Address, Gender, Salary, SuperSSN, DNo)

 

Department (DName, DNo, MgrSSN, MgrStartDate)

 

Project(PName, PNo, PLocation, DNo)

 

Works_On (SSN, PNo, Hours)

 

Dept_Location (Dno, DLocation)

 

Dependent (Essn, Dependent_name, Gender, Bdate, Relationship)

More products