Table of Contents
Fetching ...

Exact and Approximate Counting of Database Repairs

Marco Calautti, Ester Livshits, Andreas Pieris, Markus Schneider

TL;DR

This work advances the theory of consistent query answering by providing a complete FP/$\sharp\mathrm{P}$-complete dichotomy for exact counting of database repairs when the integrity constraints are functional dependencies with an LHS chain, and extends the analysis to arbitrary CQs. It introduces a polynomial-time safety test for SJFCQs that characterizes the tractable side and presents a recursiveEval procedure that computes the relative frequency of query entailment in FP when safety holds. In the approximation landscape, the authors show an $FPRAS$ for FD sets with an LHS chain and SJFCQs, while proving (under standard complexity assumptions) that no $FPRAS$ can exist in general, and that some simple FD sets render $\sharp\mathsf{Repairs}(\Sigma,Q)$ non-approximable for all SJFCQs. The results collectively push toward a full approximate counting dichotomy for repairs and offer crucial techniques—rewrite rules, blocktrees, and reductions—that connect database repair counting to core problems in theoretical computer science. The findings have potential practical impact on diagnosing database inconsistency and guiding data-cleaning strategies with provable performance guarantees.

Abstract

A key task in the context of consistent query answering is to count the number of repairs that entail the query, with the ultimate goal being a precise data complexity classification. This has been achieved in the case of primary keys and self-join-free conjunctive queries (CQs) via an FP/#P-complete dichotomy. We lift this result to the more general case of functional dependencies (FDs). Another important task in this context is whenever the counting problem in question is intractable, to classify it as approximable, i.e., the target value can be efficiently approximated with error guarantees via a fully polynomial-time randomized approximation scheme (FPRAS), or as inapproximable. Although for primary keys and CQs (even with self-joins) the problem is always approximable, we prove that this is not the case for FDs. We show, however, that the class of FDs with a left-hand side chain forms an island of approximability. We see these results, apart from being interesting in their own right, as crucial steps towards a complete classification of approximate counting of repairs in the case of FDs and self-join-free CQs.

Exact and Approximate Counting of Database Repairs

TL;DR

This work advances the theory of consistent query answering by providing a complete FP/-complete dichotomy for exact counting of database repairs when the integrity constraints are functional dependencies with an LHS chain, and extends the analysis to arbitrary CQs. It introduces a polynomial-time safety test for SJFCQs that characterizes the tractable side and presents a recursiveEval procedure that computes the relative frequency of query entailment in FP when safety holds. In the approximation landscape, the authors show an for FD sets with an LHS chain and SJFCQs, while proving (under standard complexity assumptions) that no can exist in general, and that some simple FD sets render non-approximable for all SJFCQs. The results collectively push toward a full approximate counting dichotomy for repairs and offer crucial techniques—rewrite rules, blocktrees, and reductions—that connect database repair counting to core problems in theoretical computer science. The findings have potential practical impact on diagnosing database inconsistency and guiding data-cleaning strategies with provable performance guarantees.

Abstract

A key task in the context of consistent query answering is to count the number of repairs that entail the query, with the ultimate goal being a precise data complexity classification. This has been achieved in the case of primary keys and self-join-free conjunctive queries (CQs) via an FP/#P-complete dichotomy. We lift this result to the more general case of functional dependencies (FDs). Another important task in this context is whenever the counting problem in question is intractable, to classify it as approximable, i.e., the target value can be efficiently approximated with error guarantees via a fully polynomial-time randomized approximation scheme (FPRAS), or as inapproximable. Although for primary keys and CQs (even with self-joins) the problem is always approximable, we prove that this is not the case for FDs. We show, however, that the class of FDs with a left-hand side chain forms an island of approximability. We see these results, apart from being interesting in their own right, as crucial steps towards a complete classification of approximate counting of repairs in the case of FDs and self-join-free CQs.
Paper Structure (76 sections, 64 theorems, 162 equations, 4 figures, 4 algorithms)

This paper contains 76 sections, 64 theorems, 162 equations, 4 figures, 4 algorithms.

Key Result

Lemma 1

Consider a database $D$, a set $\Sigma$ of FDs, and an SJFCQ $Q(\bar{x})$. We can compute in polynomial time a database $D'$ and a tuple $\bar{t} \in \mathsf{dom}(D')^{|\bar{x}|}$ such that $\sharp \mathsf{rep}_{\Sigma}(D) = \sharp \mathsf{rep}_{\Sigma,Q,\bar{t}}(D')$.

Figures (4)

  • Figure 1: An inconsistent database of a railroad company.
  • Figure 2: The $(\mathit{Schedule},\Lambda)$-blocktree of the database of Figure \ref{['fig:trains']} w.r.t. the FD set of Example \ref{['example:train_fds']}.
  • Figure 3: Rewrite rules for pairs consisting of an FD set $\Sigma$ with an LHS chain and an SJFCQs $Q$.
  • Figure 4: The recursive procedure $\mathsf{IsSafe}$

Theorems & Definitions (135)

  • Example 1
  • Example 2
  • Example 3
  • Example 4
  • Example 5
  • Lemma 1
  • proof
  • Theorem 1: MaWi13
  • Example 6
  • Definition 1: LHS Chain FDs, LiKW21
  • ...and 125 more