Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Evaluate three pros and three cons of e-prescribing

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago