Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Relational Algebra The schema of a table describes the structure of the table, including the names and types of its columns. Here are the schemas

Relational Algebra
The schema of a table describes the structure of the table, including the names and types of its columns. Here are the schemas for the tables.
Department (DName, DNumber, MgrSSN, MgrStartDate) Dept_Locations (DNumber, DLocation)
Employee(FName, MName, LNamne, SSN, BDate, Address, Sex, Salary, SuperSSN (Supervisors
SSN), DNo)
DEPENDENT(ESSN, Dependent_Name, Sex, BDate, Relationship) PROJECTS(PName, PNumber, PLocation, DNum) WORKS_ON(ESSN, PNo, Hours)
Using relational algebra, answer the following questions.
1. List the names of employees in department 5 who work more than 10 hours per week on the ProductX project. (Hint: simple Select-Project-Join query)
2. List the names of employees who have a dependent with the same first name as themselves. (Hint: simple Select-Project-Join query)
3. List the names of employees who are directly supervised by Franklin Wong. (Hint: select- project-self-join query)
4. List the names of employees who work on every project. (Hint: Divide query)
5. List the names of employees who do not work on any project. (Hint: use minus)
6. List the names and addresses of employees who work on at least one project located in Houston but whose department has no location in Houston. (Hint: Use intersect for the "but" and minus for the second criterion)
7. List the names of department managers who have no dependents. (Hint: Use minus)
8. List the names of employees whose supervisor's supervisor has a social security number of 888665555.(Hint: self-join twice!)
9. List the name(s) of employee(s) with the lowest salary. (Hint: Since we do not have aggregate operation min, you can use find the employees that are NOT the lowest in salary and then use minus)
10. List the names of employees who work in the department that has an employee with the highest salary among all employees. (Hint: similar to previous!)

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

More Books

Students also viewed these Databases questions

Question

What are the main objectives of Inventory ?

Answered: 1 week ago

Question

Explain the various inventory management techniques in detail.

Answered: 1 week ago