Answered step by step
Verified Expert Solution
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 DeptLocations DNumber DLocation
EmployeeFName MName, LNamne, SSN BDate, Address, Sex, Salary, SuperSSN Supervisors
SSN DNo
DEPENDENTESSN DependentName, Sex, BDate, Relationship PROJECTSPName PNumber, PLocation, DNum WORKSONESSN PNo, Hours
Using relational algebra, answer the following questions.
List the names of employees in department who work more than hours per week on the ProductX project. Hint: simple SelectProjectJoin query
List the names of employees who have a dependent with the same first name as themselves. Hint: simple SelectProjectJoin query
List the names of employees who are directly supervised by Franklin Wong. Hint: select projectselfjoin query
List the names of employees who work on every project. Hint: Divide query
List the names of employees who do not work on any project. Hint: use minus
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
List the names of department managers who have no dependents. Hint: Use minus
List the names of employees whose supervisor's supervisor has a social security number of Hint: selfjoin twice!
List the names of employees 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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started