The evaluation of a query over a probabilistic database boils down to computing the probability of a suitable Boolean function, the lineage of the query over the database. The method of query compilation approaches the task in two stages: first, the query lineage is implemented (compiled) in a circuit form where probability computation is tractable; and second, the desired probability is computed over the compiled circuit. A basic theoretical quest in query compilation is that of identifying pertinent classes of queries whose lineages admit compact representations over increasingly succinct, tractable circuit classes.Fostering previous work by Jha and Suciu [20] and Petke and Razgon [31], we focus on queries whose lineages admit circuit implementations with small treewidth, and investigate their compilability within tame classes of decision diagrams. In perfect analogy with the characterization of bounded circuit pathwidth by bounded OBDD width [20], we show that a class of Boolean functions has bounded circuit treewidth if and only if it has bounded SDD width. Sentential decision diagrams (SDDs) are central in knowledge compilation, being essentially as tractable as OBDDs [13] but exponentially more succinct [4]. By incorporating constant width SDDs and polynomial size SDDs, we refine the panorama of query compilation for unions of conjunctive queries with and without inequalities [19,20].
ContributionIn the first part of the article (Section 3), we show that a class of Boolean functions has bounded circuit treewidth if and only if it has bounded SDD width, which perfectly complements the aforementioned characterization of circuit pathwidth via OBDD width by Jha and Suciu.More precisely, we prove the following (Theorem 4 and surrounding discussion).1 OBDDs are deterministic decomposable circuits. 2 The lower bound holds even for primal treewidth, which is (unboundedly) larger than circuit treewidth. 3 A special case where such a compilation is available is that of lineages of an MSO query over databases of bounded treewidth, which have linear size deterministic decomposable forms [1, If (a, i) gives {z 2i−1 , z 2i } ⊆ {x 2 k ,1 , . . . , x 2 k ,m−2 }, then the corresponding subdisjunction reduces to one disjunct only; and, if (a, i) gives {z 2i−1 , z 2i } = {x 2 k ,m−1 , x 2 k ,m }, then the corresponding subdisjunction reduces to two disjuncts only, as the following example illustrates.Example 6 (k = 2, m = 4). Continuing Example 5, the following lists the one disjunct corresponding to "a orbits on 7": z 13 z 14 z 15 ∧ *