11
Datalog
•Recall: a conjunctive query has the form:

q(x) = 9 y1… 9 yk.f(x, y)

where f is a conjunction of positive atomic formulas
•Example:


stands for 9 u.9 v.(R(x,u) Æ R(u,v) Æ R(v,y))
q(x,y) :-  R(x,u), R(u,v), R(v,y)