Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the following queries in SQL select statements. a) For each department, retrieve the departments name, the department managers name, the departments locations, and the

Write the following queries in SQL select statements.

a) For each department, retrieve the departments name, the department managers name, the departments locations, and the names of the projects controlled by the department.

b) Retrieve the number and name of each department that controls at least one project that is in the same location (Plocation) as the departments location (Dlocation). Write this query without using a quantifier, i.e., write using only joins.

c) Retrieve the number and name of each department that does not control any project that is in the same location (Plocation) as the departments location (Dlocation).

image text in transcribed

Figure 5.7 Referential integrity constraints displayed on the COMPANY relational database schema EMPLOYEE Fname |Minit Lname SenBdate Address S ex SalarySuper ssn Dno DEPARTMENT Dname Dnumber Mgr ssn Mgr start date DEPT LOCATIONS Dnumber Dlocation PROJECT Pname Pumber Plocation Dnum WORKS ON Essn Po 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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

Finding and scheduling appointments with new prospective clients.

Answered: 1 week ago