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

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) 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Database System Concepts

ISBN: 978-0072554816

4th Edition

Authors: Henry F. Korth, S. Sudarshan

Question Posted: