Introduction to
Logic Programming
What
versus
How
 

Exercise 13.5 - Database Update


Given the view definition shown below, there are three general ways to update the p and q relations when given a request to add or delete an atom involving the r relation. Define add and delete for each of these possibilities.

r(X,Y) :- p(X,Y) & q(X,Y)