Question: Consider the relational database of Figure. Write a Datalog program for each of the following queries: a. Find all employees who work (directly or indirectly)

Consider the relational database of Figure. Write a Datalog program for each of the following queries:

a. Find all employees who work (directly or indirectly) under the manager “Jones”.

b. Find all cities of residence of all employees who work (directly or indirectly) under the manager “Jones”.

c. Find all pairs of employees who have a (direct or indirect) manager in common.

d. Find all pairs of employees who have a (direct or indirect) manager in common, and are at the same number of levels of supervision below the common manager.

Step by Step Solution

3.31 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Find all employees who work directly or indirectly under the man... View full answer

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

Document Format (1 attachment)

Word file Icon

16-CS-DB (157).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!