Datalog Rules and Queries
A pure datalog rule has the following form:
head :- atom1, atom2, …., atom,…
where all the atoms are non-negated and relational.
BritishProduct(X) :- Product(X,Y,P) & Company(P, “UK”, SP)
A datalog program is a set of datalog rules.
A program with a single rule is a conjunctive query.
We distinguish EDB predicates and IDB predicates
- EDB’s are stored in the database, appear only in the bodies
- IDB’s are intensionally defined, appear in both bodies and heads.