Sampling Query Feedback Restricted Repairs of Functional Dependency Violations: Complexity and Algorithm

  • Dongjing Miao
  • Xianmin Liu
  • Jianzhong Li
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8591)


An inconsistent database is a database instance violating integrity constraints. A repair of an inconsistent database is a maximal consistent subset. Sampling from the repair space is an alternative approach meeting the needs of many applications. In this paper, we introduce a new class of repair, query feedback restricted repair, based on the feedback on user’s witness query. We first map out a complete picture of both data and combined complexities of repair existence problems under different cases to identify the intractable cases. Especially, we show that if the query is a projection or a union query, then the decision problem is NP-complete; Even worse, if the query is a conjunctive query, the decision problem becomes \(\Sigma_{2}^{\mathrm{P}}\)-complete. At last, we provide a random repair sampling algorithm when the witness query is a selection-join query, and it is still polynomial even under the combined complexity.


repair sampling database complexity 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Staworko, S., Chomicki, J., Marcinkowski, J.: Prioritized repairing and consistent query answering in relational databases. Annals of Mathematics and Artificial Intelligence 64(2-3), 209–246 (2012)CrossRefzbMATHMathSciNetGoogle Scholar
  2. 2.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley (1995)Google Scholar
  3. 3.
    Bohannon, P., Fan, W., Geerts, F., Jia, X., Kementsietsidis, A.: Conditional functional dependencies for data cleaning. In: IEEE 23rd International Conference on Data Engineering, ICDE 2007, pp. 746–755. IEEE (2007)Google Scholar
  4. 4.
    Beskales, G., Ilyas, I.F., Golab, L., Galiullin, A.: Sampling from repairs of conditional functional dependency violations. The VLDB Journal 23(1), 103–128 (2014)CrossRefGoogle Scholar
  5. 5.
    Bohannon, P., Fan, W., Flaster, M., Rastogi, R.: A cost-based model and effective heuristic for repairing constraints by value modification. In: Proceedings of the 2005 ACM SIGMOD International Conference on Management of Data, SIGMOD 2005, pp. 143–154. ACM, New York (2005)Google Scholar
  6. 6.
    Cong, G., Fan, W., Geerts, F., Jia, X., Ma, S.: Improving data quality: Consistency and accuracy. In: Proceedings of the 33rd International Conference on Very Large Data Bases, VLDB 2007, pp. 315–326. VLDB Endowment (2007)Google Scholar
  7. 7.
    Lopatenko, A., Bravo, L.: Efficient approximation algorithms for repairing inconsistent databases. In: IEEE 23rd International Conference on Data Engineering, ICDE 2007, pp. 216–225. IEEE (2007)Google Scholar
  8. 8.
    Chomicki, J., Marcinkowski, J.: Minimal-change integrity maintenance using tuple deletions. Inf. Comput. 197(1/2), 90–121 (2005)CrossRefzbMATHMathSciNetGoogle Scholar
  9. 9.
    Chiang, F., Miller, R.J.: A unified model for data and constraint repair. In: IEEE 27th International Conference on Data Engineering, ICDE 2011, pp. 446–457. IEEE (2011)Google Scholar
  10. 10.
    Lopatenko, A., Bertossi, L.: Complexity of consistent query answering in databases under cardinality-based and incremental repair semantics. In: Schwentick, T., Suciu, D. (eds.) ICDT 2007. LNCS, vol. 4353, pp. 179–193. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  11. 11.
    Wijsen, J.: Condensed representation of database repairs for consistent query answering. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, pp. 378–393. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Arenas, M., Bertossi, L., Chomicki, J.: Consistent query answers in inconsistent databases. In: Proceedings of the Eighteenth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS 1999, pp. 68–79. ACM, New York (1999)CrossRefGoogle Scholar
  13. 13.
    Fuxman, A., Miller, R.J.: First-order query rewriting for inconsistent databases. J. Comput. Syst. Sci. 73(4), 610–635 (2007)CrossRefzbMATHMathSciNetGoogle Scholar
  14. 14.
    Afrati, F.N., Kolaitis, P.G.: Repair checking in inconsistent databases: Algorithms and complexity. In: Proceedings of the 12th International Conference on Database Theory, ICDT 2009, pp. 31–41. ACM, New York (2009)Google Scholar
  15. 15.
    Cosmadakis, S.S., Papadimitriou, C.H.: Updates of relational views. J. ACM 31(4), 742–760 (1984)CrossRefzbMATHMathSciNetGoogle Scholar
  16. 16.
    Lechtenbörger, J., Vossen, G.: On the computation of relational view complements. ACM Trans. Database Syst. 28(2), 175–208 (2003)CrossRefGoogle Scholar
  17. 17.
    Bancilhon, F., Spyratos, N.: Update semantics of relational views. ACM Trans. Database Syst. 6(4), 557–575 (1981)CrossRefzbMATHGoogle Scholar
  18. 18.
    Kimelfeld, B., Vondrák, J., Woodruff, D.P.: Multi-tuple deletion propagation: Approximations and complexity. Proc. VLDB Endow., pp. 1558–1569 (2013)Google Scholar
  19. 19.
    Cong, G., Fan, W., Geerts, F., Li, J., Luo, J.: On the complexity of view update analysis and its application to annotation propagation. IEEE Trans. on Knowl. and Data Eng. 24(3), 506–519 (2012)CrossRefGoogle Scholar
  20. 20.
    Keller, A.M.: Algorithms for translating view updates to database updates for views involving selections, projections, and joins. In: Proceedings of the Fourth ACM SIGACT-SIGMOD Symposium on Principles of Database Systems, PODS 1985, pp. 154–163. ACM, New York (1985)CrossRefGoogle Scholar
  21. 21.
    Bohannon, A., Pierce, B.C., Vaughan, J.A.: Relational lenses: A language for updatable views. In: Proceedings of the Twenty-fifth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS 2006, pp. 338–347. ACM, New York (2006)CrossRefGoogle Scholar
  22. 22.
    Cui, Y., Widom, J.: Run-time translation of view tuple deletions using data lineage. Technique report (2001)Google Scholar
  23. 23.
    Dayal, U., Bernstein, P.A.: On the correct translation of update operations on relational views. ACM Trans. Database Syst. 7(3), 381–416 (1982)CrossRefzbMATHMathSciNetGoogle Scholar
  24. 24.
    Klug, A.C.: Calculating constraints on relational expression. ACM Trans. Database Syst. 5(3), 260–290 (1980)CrossRefzbMATHMathSciNetGoogle Scholar
  25. 25.
    Klug, A.C., Price, R.: Determining view dependencies using tableaux. ACM Trans. Database Syst. 7(3), 361–380 (1982)CrossRefzbMATHMathSciNetGoogle Scholar
  26. 26.
    Fan, W., Ma, S., Hu, Y., Liu, J., Wu, Y.: Propagating functional dependencies with conditions. Proc. VLDB Endow. 1(1), 391–407 (2008)CrossRefGoogle Scholar
  27. 27.
    Vardi, M.Y.: The complexity of relational query languages (extended abstract). In: Proceedings of the Fourteenth Annual ACM Symposium on Theory of Computing, STOC 1982, pp. 137–146. ACM, New York (1982)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Dongjing Miao
    • 1
  • Xianmin Liu
    • 1
  • Jianzhong Li
    • 1
  1. 1.Harbin Institute of TechnologyHarbinChina

Personalised recommendations