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 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 BdateRelationshipStep 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