We tackle the containment problem for conjunctive queries with negation, which takes two queries q1 and q2 as input and asks if q1 is contained in q2. A general approach for solving this problem consists of considering all completions of q1 (intuitively these completions represent all canonical databases that satisfy q1) and checking if each completion yields the same answer on q2. Since the total number of completions of q1 is exponential in the size of q1, several proposals have aimed at reducing the number (and the size) of the completions checked. In this paper, we propose a unifying framework for comparing algorithms following this general approach and define two kinds of heuristics for exploring the space of completions. Combining these heuristics with both classical kinds of traversals, i.e., depth-first and breadth-first, we obtain four algorithms that we compare experimentally with respect to running time on difficult instances of the containment problem.
['Khalil Mohamed', 'Michel Leclère', 'Marie-Laure Mugnier']
A theoretical and experimental comparison of algorithms for the containment of conjunctive queries with negation