Question: Question 4 . [ 5 0 marks ] A relational database schema consists of four relation schemas for a fast - food enterprise with many
Question
marks
A relational database schema consists of four relation schemas for a fastfood enterprise with many branches.
The STAFF relation stores the personal data of every staff member.
The BRANCH relation stores the address data of every branch.
Each staff works in one branch. The WORKIN relation stores the salary and the branch of every staff.
Each staff has at most one supervisor. The MANAGE relation stores every pair of subordinate and supervisor. Both MemberID and ManagerID are foreign keys referencing STAFF.StaffID.
In each subquestion af please convert each English statement into
i one relational algebra expression and
ii one SQL statement.
a
marks
Use Natural Join Inner Join to find the staff names, staff cities, and salaries of all employees who work in the branch named B and earn more than $
b
marks
Use Cartesian Product to find the staff names, staff cities, and salaries of all employees who work in the branch named B and earn more than $
c
marks
Find the staff names, branch streets, and branch cities for all employees who work in the same cities where they live.
d
marks
Find the names and salaries of all employees from the branch named B who earn more than the average salary of all employees in the enterprise.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
