CS345 Assignment #6

Due Monday, May 24, 1999

Problem Set

  1. (30 pts.) In the following problem you are given some views with binding patterns, and you are asked to develop a Datalog program that answers a query using those views properly (i.e., with bindings for each argument that needs to be bound). You may apply the methodology outlined in class or any other appropriate methodology, but in the latter case, justify what you are doing.

    The global predicates are:

    The views are:

    The query is: ans(P,O) :- ep(E,P) & eo(E,O).

    Write the inverse rules for the views.

    Assuming that each of phone, office, and department are in domains by themselves, but employees and managers are the same domain, write a Datalog program that finds all possible answers to the query. You may follow the recipe given in class, where you write rules for the domains from the global predicates (which now stand for their own discoverable parts), rules that use the inverse rules from (a) with domain subgoals to represent proper bindings, and a rule to synthesize the answer from the discoverable portions of ep and eo. It is also acceptable to follow some other methodology that you explain.

    Is your program recursive? If it looks recursive, can you simplify it so the recursion disappears? If so, do it.

  2. (20 pts.) Below are descriptions of ``typical'' students, faculty, and departments:

    Show how typical student, faculty, and department objects could be represented in OEM. Draw at least one example of links between each pair of object types, if that link is meaningful.

  3. (20 pts.) Suppose have we the following four sources that contain information about books:

    You may assume that books with the same title are the same book. Write MSL rules for a mediator that uses these sources and exports the following objects:

    Objects that provide the author and title for a book.

    Objects that give the libraries and bookstores where a book can be found.

    Objects that provide information about libraries, their addresses, the titles they carry, and the authors for those books.

    Objects that have information about bookstores and the authors they carry.

  4. (30 pts.) Suppose we have the following sources:

    The mediator exports the following objects:

    Write Tsimmis-style queries (following the Datalog-based simplification of MSL that we introduced in class) for the following:

    • Which passengers are on flight UA775?

    • Which flight is Mike Smith on, and what is his telephone number and address?

    • Which airlines have flights from New York to Chicago?

    What are the IM solutions to the above queries, and how do they compare to the Tsimmis solutions?