Skip to main content

A SAT-Based System for Consistent Query Answering

  • Conference paper
  • First Online:
Theory and Applications of Satisfiability Testing – SAT 2019 (SAT 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11628))

Abstract

An inconsistent database is a database that violates one or more integrity constraints, such as functional dependencies. Consistent Query Answering is a rigorous and principled approach to the semantics of queries posed against inconsistent databases. The consistent answers to a query on an inconsistent database is the intersection of the answers to the query on every repair, i.e., on every consistent database that differs from the given inconsistent one in a minimal way. Computing the consistent answers of a fixed conjunctive query on a given inconsistent database can be a coNP-hard problem, even though every fixed conjunctive query is efficiently computable on a given consistent database.

We designed, implemented, and evaluated CAvSAT, a SAT-based system for consistent query answering. CAvSAT leverages a set of natural reductions from the complement of consistent query answering to SAT and to Weighted MaxSAT. The system is capable of handling unions of conjunctive queries and arbitrary denial constraints, which include functional dependencies as a special case. We report results from experiments evaluating CAvSAT on both synthetic and real-world databases. These results provide evidence that a SAT-based approach can give rise to a comprehensive and scalable system for consistent query answering.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Food Inspections, City of Chicago, August 2011. https://data.cityofchicago.org/Health-Human-Services/Food-Inspections/4ijn-s7e5

  2. New York City Restaurant Inspection Results, Department of Health and Mental Hygiene (DOHMH), August 2014. https://data.cityofnewyork.us/Health/DOHMH-New-York-City-Restaurant-Inspection-Results/43nn-pn8j

  3. 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). https://doi.org/10.1145/303976.303983

  4. Arenas, M., Bertossi, L.E., Chomicki, J.: Answer sets for consistent query answering in inconsistent databases. TPLP 3(4–5), 393–424 (2003). https://doi.org/10.1017/S1471068403001832

    Article  MathSciNet  MATH  Google Scholar 

  5. Barceló, P., Bertossi, L.E.: Logic programs for querying inconsistent databases. In: Proceedings Practical Aspects of Declarative Languages, 5th International Symposium, PADL 2003, New Orleans, LA, USA, 13–14 January 2003, pp. 208–222 (2003). https://doi.org/10.1007/3-540-36388-2_15

    Google Scholar 

  6. Bertossi, L.E.: Database Repairing and Consistent Query Answering. Synthesis Lectures on Data Management, Morgan & Claypool Publishers (2011). https://doi.org/10.2200/S00379ED1V01Y201108DTM020

    Article  Google Scholar 

  7. ten Cate, B., Fontaine, G., Kolaitis, P.G.: On the data complexity of consistent query answering. In: International Conference on Database Theory (ICDT), pp. 22–33 (2012)

    Google Scholar 

  8. Chomicki, J., Marcinkowski, J., Staworko, S.: Computing consistent query answers using conflict hypergraphs. In: Proceedings of the Thirteenth ACM International Conference on Information and Knowledge Management, CIKM 2004, pp. 417–426. ACM, New York (2004). https://doi.org/10.1145/1031171.1031254

  9. Chomicki, J., Marcinkowski, J., Staworko, S.: Hippo: a system for computing consistent answers to a class of SQL queries. In: Bertino, E., Christodoulakis, S., Plexousakis, D., Christophides, V., Koubarakis, M., Böhm, K., Ferrari, E. (eds.) EDBT 2004. LNCS, vol. 2992, pp. 841–844. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24741-8_53

    Chapter  Google Scholar 

  10. Davies, J., Bacchus, F.: Solving MAXSAT by solving a sequence of simpler SAT instances. In: Lee, J. (ed.) CP 2011. LNCS, vol. 6876, pp. 225–239. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23786-7_19

    Chapter  Google Scholar 

  11. Dixit, A.A., Kolaitis, P.G.: A SAT-based system for consistent query answering. abs/1905.02828 (2019). http://arxiv.org/abs/1905.02828

    Google Scholar 

  12. Fuxman, A., Fazli, E., Miller, R.J.: ConQuer: efficient management of inconsistent databases. In: Proceedings of the 2005 ACM SIGMOD International Conference on Management of Data, SIGMOD 2005, pp. 155–166. ACM, New York (2005). https://doi.org/10.1145/1066157.1066176

  13. Fuxman, A., Fuxman, D., Miller, R.J.: ConQuer: a system for efficient querying over inconsistent databases. In: Proceedings of the 31st International Conference on Very Large Data Bases, VLDB 2005, pp. 1354–1357. VLDB Endowment (2005). http://dl.acm.org/citation.cfm?id=1083592.1083774

  14. Fuxman, A., Miller, R.J.: First-order query rewriting for inconsistent databases. J. Comput. Syst. Sci. 73(4), 610–635 (2007)

    Article  MathSciNet  Google Scholar 

  15. Greco, G., Greco, S., Zumpano, E.: A logical framework for querying and repairing inconsistent databases. IEEE Trans. Knowl. Data Eng. 15(6), 1389–1408 (2003). https://doi.org/10.1109/TKDE.2003.1245280

    Article  Google Scholar 

  16. Grieco, L., Lembo, D., Rosati, R., Ruzzi, M.: Consistent query answering under key and exclusion dependencies: algorithms and experiments. In: Proceedings of the 14th ACM International Conference on Information and Knowledge Management, CIKM 2005, pp. 792–799. ACM, New York (2005). https://doi.org/10.1145/1099554.1099742

  17. Ilyas, I.F., Chu, X.: Trends in cleaning relational data: consistency and deduplication. Found. Trends Databases 5(4), 281–393 (2015). https://doi.org/10.1561/1900000045

    Article  MATH  Google Scholar 

  18. Kolaitis, P.G., Pema, E.: A dichotomy in the complexity of consistent query answering for queries with two atoms. Inf. Process. Lett. 112(3), 77–85 (2012). https://doi.org/10.1016/j.ipl.2011.10.018

    Article  MathSciNet  MATH  Google Scholar 

  19. Kolaitis, P.G., Pema, E., Tan, W.: Efficient querying of inconsistent databases with binary integer programming. PVLDB 6(6), 397–408 (2013). https://doi.org/10.14778/2536336.2536341

    Article  Google Scholar 

  20. Koutris, P., Wijsen, J.: The data complexity of consistent query answering for self-join-free conjunctive queries under primary key constraints. In: Proceedings of the 34th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2015, pp. 17–29. ACM, New York (2015). https://doi.org/10.1145/2745754.2745769

  21. Koutris, P., Wijsen, J.: Consistent query answering for primary keys. SIGMOD Rec. 45(1), 15–22 (2016). https://doi.org/10.1145/2949741.2949746

    Article  Google Scholar 

  22. Koutris, P., Wijsen, J.: Consistent query answering for self-join-free conjunctive queries under primary key constraints. ACM Trans. Database Syst. 42(2), 9:1–9:45 (2017). https://doi.org/10.1145/3068334

    Article  MathSciNet  Google Scholar 

  23. Lembo, D., Rosati, R., Ruzzi, M.: On the first-order reducibility of unions of conjunctive queries over inconsistent databases. In: Grust, T., et al. (eds.) EDBT 2006. LNCS, vol. 4254, pp. 358–374. Springer, Heidelberg (2006). https://doi.org/10.1007/11896548_28

    Chapter  Google Scholar 

  24. Manna, M., Ricca, F., Terracina, G.: Consistent query answering via ASP from different perspectives: theory and practice. CoRR abs/1107.4570 (2011). http://arxiv.org/abs/1107.4570

  25. Marileo, M.C., Bertossi, L.E.: The consistency extractor system: answer set programs for consistent query answering in databases. Data Knowl. Eng. 69(6), 545–572 (2010). https://doi.org/10.1016/j.datak.2010.01.005

    Article  Google Scholar 

  26. Rekatsinas, T., Chu, X., Ilyas, I.F., Ré, C.: HoloClean: holistic data repairs with probabilistic inference. Proc. VLDB Endow. 10(11), 1190–1201 (2017). https://doi.org/10.14778/3137628.3137631

    Article  Google Scholar 

  27. Wijsen, J.: Consistent query answering under primary keys: a characterization of tractable queries. In: Proceedings of the 12th International Conference on Database Theory, ICDT 2009, pp. 42–52. ACM, New York (2009). https://doi.org/10.1145/1514894.1514900

  28. Wijsen, J.: A remark on the complexity of consistent conjunctive query answering under primary key violations. Inf. Process. Lett. 110(21), 950–955 (2010). https://doi.org/10.1016/j.ipl.2010.07.021

    Article  MathSciNet  MATH  Google Scholar 

  29. Wijsen, J.: Certain conjunctive query answering in first-order logic. ACM Trans. Database Syst. 37(2), 9:1–9:35 (2012). https://doi.org/10.1145/2188349.2188351

    Article  MathSciNet  Google Scholar 

  30. Wijsen, J.: Charting the tractability frontier of certain conjunctive query answering. In: Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2013, pp. 189–200. ACM, New York (2013). https://doi.org/10.1145/2463664.2463666

Download references

Acknowledgments

Dixit is supported by the Center for Research in Open Source Software (CROSS) at UC Santa Cruz. Kolaitis is supported by NSF Grant IIS:1814152.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Akhil A. Dixit .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Dixit, A.A., Kolaitis, P.G. (2019). A SAT-Based System for Consistent Query Answering. In: Janota, M., Lynce, I. (eds) Theory and Applications of Satisfiability Testing – SAT 2019. SAT 2019. Lecture Notes in Computer Science(), vol 11628. Springer, Cham. https://doi.org/10.1007/978-3-030-24258-9_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-24258-9_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-24257-2

  • Online ISBN: 978-3-030-24258-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics