Question: QUESTION 1: Given the following schema above write a sequence of relational algebra expressions for the following queries: Note: In the DEPT_LOCATIONS relation, Dlocation attribute

 QUESTION 1: Given the following schema above write a sequence of

QUESTION 1: Given the following schema above write a sequence of relational algebra expressions for the following queries:

Note: In the DEPT_LOCATIONS relation, Dlocation attribute represents the location of a department, and in the PROJECT relation, Dnum attribute represents the unique id of the department that controls the project.

(For each intermediate result relation, add a comment describing its key content. DO NOT USE SQL QUERIES)

Query 1: Retrieve the name of every department together with the number of department locations of that department.

Query 2: Retrieve the name of every department together with the number of projects controlled by that department.

Query 3: Retrieve the name of every department whose number of department locations is the same as the number of projects controlled by that department.

EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super ssn Dno DEPARTMENT Dname Dnumber Mgr ssn Mgr_start date DEPT LOCATIONS Dnumber Dlocation PROJECT Phame Pnumber location Dnum WORKS ON Essn Pno Hours DEPENDENT Essn Dependent name Sex BdateRelationship EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Super ssn Dno DEPARTMENT Dname Dnumber Mgr ssn Mgr_start date DEPT LOCATIONS Dnumber Dlocation PROJECT Phame Pnumber location Dnum WORKS ON Essn Pno Hours DEPENDENT Essn Dependent name Sex BdateRelationship

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!