Prolog
Assignment
Due
Tuesday November 9, 2004
Name ____________________________ Possible points: 16 Earned Points ____
For each of these questions, you should try to
answer it without running the query and you should then run it to see if you
are correct. Do screen captures and
attach them to this sheet to demonstrate that you ran them and that they
worked. Use the database called
OfficePro.txt which, once you download
it, you may need to rename it as
OfficePro.pro or OfficePro.pl
to be able to consult it.
1.
Which version of Prolog are you using? (2)
2. How
do you indicate a comment in your version of Prolog? (2)
3. What
will be returned by the query works_for
(stenographer, Who). ? (2)
4. Why
did you get the answer you got for question 2? (2)
5. What
will be returned by the query works_for
(Worker, finance_officer). ? (2)
6. What
will be returned by the query works_for
(Who, production_manager). ?
(2)
7. Write
the query that will tell who works for the director. (2)
8. Write
the query that will show all the relations in the database. (2)