Introduction to
Logic Programming
What
versus
How
 

Exercise 13.4 - Database Update


Assume that the t relation is defined as shown below. Define add and delete to update the t relation properly when a user requests the system to add or delete a p or q factoid.

t(X,Y) :- p(X,Y)
t(X,Y) :- q(X,Y)