Abstract
We introduce a general abstract framework for database repairs, where the repair notions are defined using formal logic. We distinguish between integrity constraints and so-called query constraints. The former are used to model consistency and desirable properties of the data (such as functional dependencies and independencies), while the latter relate two database instances according to their answers to the query constraints. The framework allows for a distinction between hard and soft queries, allowing the answers to a core set of queries to be preserved, as well as defining a distance between instances based on query answers. We illustrate how different repair notions from the literature can be modelled in our framework. The framework generalises both set-based and cardinality based repairs to semiring annotated databases. Finally, we initiate a complexity-theoretic analysis of consistent query answering and checking existence of a repair in our setting.
TL;DR
This research introduces a unified, logic-based framework for "repairing" inconsistent databases—those that violate predefined rules. By leveraging semiring annotations and a novel distinction between hard and soft constraints, the framework models a wide variety of existing repair strategies while providing a formal foundation for handling complex data types like bags and provenance.
The Challenge of Inconsistent Data
In real-world applications, data is rarely perfect. Aggregating information from multiple sources often results in databases that violate Integrity Constraints (ICs)—for instance, an employee might be assigned two different IDs, or a department might exceed its allowed manager count.
To resolve these issues, researchers use "database repairs": consistent versions of the database that remain as "similar" as possible to the original. However, the definition of similarity is subjective. Some approaches prioritize minimizing the number of rows changed (cardinality-based), while others focus on the specific set of rows altered (set-based). Furthermore, modern databases often use annotations to track record counts (bag semantics) or data origins (provenance), adding layers of complexity that traditional frameworks struggle to unify.
A Unified Logical Framework
The proposed framework defines a repair using four primary logical components:
- Hard Constraints ($C_h$): Non-negotiable rules the repaired database must satisfy.
- Soft Constraints ($C_s$): Desirable properties where violations are tracked via an "inconsistency measure."
- Hard Queries ($Q_h$): A core set of query answers that must be preserved from the original database to ensure vital information isn't lost during the repair process.
- Soft Queries ($Q_s$): Queries used to define the "distance" between the original and the repair, ensuring the fix is minimal.
Crucially, the framework is built on semiring semantics. Instead of simple Boolean (True/False) values, rows are annotated with elements from a mathematical structure. This allows the framework to naturally handle standard sets, bags/multisets (using natural numbers), and even probabilistic data.
Key Insights
- Unification of Repairs: The authors demonstrate that classical repair types—such as subset, superset, and cardinality repairs—are simply specific configurations within this broader framework.
- The "Hard Query" Bridge: By introducing $Q_h$, the framework bridges database repair with Belief Revision in AI, treating certain database answers as "beliefs" that should be preserved.
- Annotation Awareness: The framework can distinguish between repairs that only care about the existence of data and those that care about the values of annotations (e.g., ensuring the total count of items remains similar).
Complexity and Results
The paper provides a detailed map of the computational complexity involved in Consistent Query Answering (CQA)—the task of identifying answers that remain true in every possible repair.
Key findings include:
- General Intractability: For most meaningful constraints, CQA is coNP-hard, meaning the difficulty grows exponentially with database size.
- The $\Theta_2^p$ Jump: When using soft queries to find the "closest" repair, complexity rises to $\Theta_2^p$-complete, requiring multiple calls to an NP-solver.
- Existence Challenges: Unlike simpler models, checking if a repair even exists (given specific hard constraints and queries) is NP-complete.
Limitations and Future Directions
While the framework offers a powerful theoretical foundation, its primary limitation is high computational cost. The authors identify these results as "mainly negative" regarding immediate performance. Future work will focus on identifying "tractable fragments"—specific rule types that can be solved efficiently—and extending the logic to more complex data models like graph databases.
Summary updated