Florent Capelli
UniversitΓ© dβArtois - CRIL
Dagtsuhl Seminar
Representation,
Provenance, and Explanations in Database Theory and Logic
January 17, 2024
define the relation of answers of over
is an implicit representation of a relation of .
A relation can also be explicitly represented as a table:
| 1 | 2 | 1 | 2 | 0 | 1 |
| 0 | 0 | 1 |
| 1 | 2 | 0 |
Given a representation of :
Complexity varies depending on the representation of .
| Problem | (CQ,) | Table |
|---|---|---|
| Emptiness | -hard | |
| Totality | ||
| Size | -hard |
A table is less succinct than a query but more tractable.
Looking for tradeoffs!
Interpret * either by as βany domain valueβ or βa
default domain valueβ (zero suppressed semantics).
Decision Gates:
| Gates | Boolean Domain |
|---|---|
| NNF | |
| DNNF | d-DNNF |
| dec-DNNF | |
| FBDD |
a circuit on domain and variable with .
| Gates | Emptiness | Totality | Size | Enumeration |
|---|---|---|---|---|
| NP-complete | coNP-complete | #P-complete | NP-hard | |
| coNP-complete | #P-complete | -delay | ||
| -delay | ||||
|
-preproc
-delay |
Assuming manipulating integers of size is polynomial in .
Complexity that only depends on is constant time in the data complexity model!
Given a full conjunctive query and a database , construct a representing .
A CQ is acyclic iff it has a join tree.
Trace of Yannakakis algorithm can be seen as a , see [Olteanu, ZΓ‘vodnΓ½].
If is βcompatible with a join treeβ, produced circuit has size linear in .

Fixing :
This is roughly the caching in Yannakakis seen from above.
Elimination order only, no join tree!
For , let .
If is good for every then DPLL returns a circuit of size linear in (and poly in ).
In particular, is acyclic for every .
If induces a fractional hypertree decomposition of width at most for every then DPLL returns a circuit of size (and poly in ).
For a circuit on variables and :
| Gates | Emptiness | Totality | Size | Enumeration |
|---|---|---|---|---|
|
-preproc
-delay |
||||
|
-preproc
-delay |
where contains negative atoms!
Bonus: circuit produced by DPLL have an extra structure allowing direct access for induced lexicographical order.