Question: USE RELATIONAL ALGEBRA! I WILL THUMBS UP ! Consider the following schema of a Company database: Assignment 1 . 5 ( 1 5 marks )
USE RELATIONAL ALGEBRA! I WILL THUMBS UP Consider the following schema of a Company database: Assignment marks
Return the eid of the Employees who are working for the maximum number of Departments.
Assignment marks
Return the pid of the Projects that have the minimum budget.
Assignment marks
Return the pids of the Projects for which at least two different Employees are working.
Assignment marks
Union and Set Difference are among the five basic RA operations, but Intersection is not. Show how
to implement Intersection using Union and Set Difference.
Employees eid: integer, ename: string, address: string,
supereid: integer, salary: integer
Departmentsdid: integer, dname: string
Projectspid: integer, pname: string, did: integer, budget:
integer
Worksoneid: integer, pid: integer, hours: integer
Primary keys are underlined. Each Employee has a supervisor another Employee referenced by their
supereid. Projects are uniquely assigned to a Department. The Workson relation records which
Employee works on which Project for how many hours a week. The primary key of a relation consists of
all its underlined attributes. There are foreign key constraints between Employees.supereid and
Employees.eid, between Worksoneid and Employees.eid, between Worksonpid and Projects.pid and
between Projects.did and Departments.did.
For assignments to formulate the natural language question as relational algebra RA query
or explain why the query cannot be formulated in RA You must use the exact notation for the RA
operations introduced in class. In particular, you cannot use dot notation to refer to attributes but must
rename attributes, where necessary.
Assignment marks
For the IT Department, return the pname of those projects of that Department for which at least one
Employee works.
Assignment marks
For each Employee, return their ename and the ename of their supervisees the Employees directly
supervised by that Employee
Assignment marks
For each Employee, return their ename and the ename of the Employees directly or indirectly supervised
by that Employee.
Assignment marks
Return the eids of Employees who do not work on every Project.
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
