Abstract: Although integrity constraints can successfully capture data semantics, the actual data in the database often violates such constraints. A Consistent Query Answer (CQA) in a possibly inconsistent database is an answer which is true in every minimal repair of the database. It has been proved that for most constraints and queries CQA is a NP problem based on repairing by tuple deletions or tuple insertions. Furthermore, repairing by deleting tuples will also cause information losing. In this paper we present a new repair semantics named repairing with nulls, which replaces the inconsistent attribute values with nulls. To capture all the inconsistent attribute values, we study the transitivity of nulls and provide an algorithm to extend the original constraints. Based on repairing with nulls, there will be only one repair and CQA can be computed in PTIME by SQL query rewriting. Finally, we study the performance of our new approach for CQA by detailed experiments.
Loading