Skip to main content

Solving SQL Constraints by Incremental Translation to SAT

  • Conference paper
New Frontiers in Applied Artificial Intelligence (IEA/AIE 2008)

Abstract

The need to model and solve constraints over large sets of relational data occurs frequently in practice. Naively and inefficiently, solutions to the problem may be implemented in ad-hoc and difficult to maintain procedural code that accesses the data through embedded SQL programming. More elegant solutions involve the use of declarative programming languages that integrates constraint modeling with database access in transparent ways. One of the more interesting constraint languages for relational databases is the language , proposed by Cadoli and Mancini, in which SQL and its relational algebraic foundation form the basis for expressing constraints. The current paper explores the feasibility of solving finite-domain  constraints via a SAT solver backend.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Amir, E., McIlraith, S.: Solving Satisfiability using Decomposition and the Most Constrained Subproblem. In: Proceedings of the Workshop on Theory and Applications of Satisfiability Testing (2001)

    Google Scholar 

  2. Bacchus, F.: CSPs: Adding Structure to SAT. In: Biere, A., Gomes, C.P. (eds.) SAT 2006. LNCS, vol. 4121, p. 10. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  3. Barrett, C.W., Dill, D.L., Stump, A.: Checking Satisfiability of First-Order Formulas by Incremental Translation to SAT. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 236–249. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  4. Bjesse, P., Kukula, J.H., Damiano, R.F., Stanion, T., Zhu, Y.: Guiding SAT Diagnosis with Tree Decompositions. In: Giunchiglia, E., Tacchella, A. (eds.) SAT 2003. LNCS, vol. 2919, pp. 315–329. Springer, Heidelberg (2004)

    Google Scholar 

  5. Bordeaux, L., Hamadi, Y., Zhang, L.: Propositional Satisfiability and Constraint Programming: A comparative survey. ACM Computing Survey 38(4) (2006)

    Google Scholar 

  6. Cadoli, M., Mancini, T.: Combining relational algebra, SQL, constraint modelling, and local search. Theory Pract. Log. Program. 7(1–2), 37–65 (2007)

    Article  MATH  MathSciNet  Google Scholar 

  7. Cai, M.: Integrating Constraint and Relational Database Systems. In: Kuijpers, B., Revesz, P.Z. (eds.) CDB 2004. LNCS, vol. 3074, pp. 180–188. Springer, Heidelberg (2004)

    Google Scholar 

  8. Elmasri, R., Navathe, S.B.: Fundamentals of Database Systems, 2nd edn. Benjamin/Cummings (1994)

    Google Scholar 

  9. Jaffar, J., Maher, M.J.: Constraint Logic Programming: A Survey. Journal of Logic Programming 19/20, 503–581 (1994)

    Article  MathSciNet  Google Scholar 

  10. Kanellakis, P.C., Goldin, D.Q.: Constraint Programming and Database Query Languages. In: Hagiya, M., Mitchell, J.C. (eds.) TACS 1994. LNCS, vol. 789, pp. 96–120. Springer, Heidelberg (1994)

    Google Scholar 

  11. Li, W., van Beek, P.: Guiding Real-World SAT Solving with Dynamic Hypergraph Separator Decomposition. In: Proceedings of ICTAI, pp. 542–548. IEEE Computer Society, Los Alamitos (2004)

    Google Scholar 

  12. Ramakrishnan, R., Gehrke, J.: Database Management Systems. McGraw-Hill Higher Education, New York (2000)

    Google Scholar 

  13. Zaniolo, C.: Deductive databases - theory meets practice. In: Bancilhon, F., Tsichritzis, D.C., Thanos, C. (eds.) EDBT 1990. LNCS, vol. 416, pp. 1–15. Springer, Heidelberg (1990)

    Chapter  Google Scholar 

  14. Zhang, H., Stickel, M.: Implementing the Davis-Putnam Procedure. Journal of Automated Reasoning 24, 277–296 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  15. Zhao, D.: Analyzing SQL Constraints. Master’s thesis, Emory University (August 2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ngoc Thanh Nguyen Leszek Borzemski Adam Grzech Moonis Ali

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Lohfert, R., Lu, J.J., Zhao, D. (2008). Solving SQL Constraints by Incremental Translation to SAT. In: Nguyen, N.T., Borzemski, L., Grzech, A., Ali, M. (eds) New Frontiers in Applied Artificial Intelligence. IEA/AIE 2008. Lecture Notes in Computer Science(), vol 5027. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69052-8_70

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69052-8_70

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69045-0

  • Online ISBN: 978-3-540-69052-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics