Efficient Handling of Relational Database Combinatorial Queries Using CSPs

  • Malek Mouhoub
  • Chang Feng
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5027)


A combinatorial query is a request for tuples from multiple relations that satisfy a conjunction of constraints on tuple attribute values. Managing combinatorial queries using the traditional database systems is very challenging due to the combinatorial nature of the problem. Indeed, for queries involving a large number of constraints, relations and tuples, the response time to satisfy these queries becomes an issue. To overcome this difficulty in practice we propose a new model integrating the Constraint Satisfaction Problem (CSP) framework into the database systems. Indeed, CSPs are very popular for solving combinatorial problems and have demonstrated their ability to tackle, in an efficient manner, real life large scale applications under constraints. In order to compare the performance in response time of our CSP-based model with the traditional way for handling combinatorial queries and implemented by MS SQL Server, we have conducted several experiments on large size databases. The results are very promizing and show the superiority of our method comparing to the traditional one.


Relational Database Constraint Satisfaction Problem Semantic Constraint Arithmetic Constraint Backtrack Search 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Atzeni, P., Antonellis, V.D.: Relational database theory. Benjamin-Cummings Publishing Co (1993)Google Scholar
  2. 2.
    Liu, C., Foster, I.T.: A framework and algorithms for applying constraint solving within relational databases. In: W(C)LP 2005, pp. 147–158 (2005)Google Scholar
  3. 3.
    Revesz, P.: Introduction to Constraint Databases. Springer, New York (2002)zbMATHGoogle Scholar
  4. 4.
    Chuang, L., Yang, L., Foster, I.T.: Efficient relational joins with arithmetic constraints on multiple attributes. In: IDEAS, pp. 210–220 (2005)Google Scholar
  5. 5.
    Vardi, M.Y.: The complexity of relational query languages. In: Annual ACM Symposium on Theory of Computing (1982)Google Scholar
  6. 6.
    Chandra, A.: Structure and complexity of relational queries. In: The 21st IEEE Symposium, pp. 333–347 (1980)Google Scholar
  7. 7.
    Dechter, R.: Constraint Processing. Morgan Kaufmann, San Francisco (2003)Google Scholar
  8. 8.
    Hentenryck, P.V.: Constraint Satisfaction in Logic Programming. MIT Press, Cambridge (1989)Google Scholar
  9. 9.
    Haralick, R., Elliott, G.: Increasing tree search efficiency for Constraint Satisfaction Problems. Artificial Intelligence 14, 263–313 (1980)CrossRefGoogle Scholar
  10. 10.
    Mackworth, A.K., Freuder, E.: The complexity of some polynomial network-consistency algorithms for constraint satisfaction problems. Artificial Intelligence 25, 65–74 (1985)CrossRefGoogle Scholar
  11. 11.
    Mackworth, A.K.: Consistency in networks of relations. Artificial Intelligence 8, 99–118 (1977)CrossRefzbMATHGoogle Scholar
  12. 12.
    Vardi, M.Y.: Constraint sastisfaction and database theory: A tutorial. In: PODS 2000 (2000)Google Scholar
  13. 13.
    Swami, A.: Optimization of large join queries: combining heuristics and combinatorial techniques. In: The 1989 ACM SIGMOD international conference on Management of data, pp. 367–376 (1989)Google Scholar
  14. 14.
    Jarke, M., Koch, J.: Query optimization in database systems. In: ACM Computing Surveys (CSUR), pp. 111–152 (1984)Google Scholar
  15. 15.
    Miguel, I., Shen, Q.: Solution techniques for constraint satisfaction problems: Foundations. Artificial Intelligence Review 15(4) (2001)Google Scholar
  16. 16.
    Mohr, R., Henderson, T.: Arc and path consistency revisited. Artificial Intelligence 28, 225–233 (1986)CrossRefGoogle Scholar
  17. 17.
    Bessière, C.: Arc-consistency and arc-consistency again. Artificial Intelligence 65, 179–190 (1994)CrossRefGoogle Scholar
  18. 18.
    Bessière, C., Freuder, E., Regin, J.: Using inference to reduce arc consistency computation. In: IJCAI 1995, Montréal, Canada, pp. 592–598 (1995)Google Scholar
  19. 19.
    Zhang, Y., Yap, R.H.C.: Making ac-3 an optimal algorithm. In: Seventeenth International Joint Conference on Artificial Intelligence (IJCAI 2001), Seattle, WA, pp. 316–321 (2001)Google Scholar
  20. 20.
    Bessière, C., Régin, J.C.: Refining the basic constraint propagation algorithm. In: Seventeenth International Joint Conference on Artificial Intelligence (IJCAI 2001), Seattle, WA, pp. 309–315 (2001)Google Scholar
  21. 21.
    Lecoutre, C., Radoslaw, S.: Generalized arc consistency for positive table constraints. In: Benhamou, F. (ed.) CP 2006. LNCS, vol. 4204, pp. 284–298. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  22. 22.
    Lecoutre, C., Vion, J.: Bound consistencies for the csp. In: Proceeding of the second international workshop Constraint Propagation And Implementation (CPAI 2005) held with the 10th International Conference on Principles and Practice of Constraint Programming (CP 2005), Sitges, Spain (September 2005)Google Scholar
  23. 23.
    Mackworth, A.K.: On reading sketch maps. In: IJCAI 1977, pp. 598–606 (1977)Google Scholar
  24. 24.
    Sabin, D., Freuder, E.C.: Contradicting conventional wisdom in constraint satisfaction. In: Proc. 11th ECAI, Amsterdam, Holland, pp. 125–129 (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Malek Mouhoub
    • 1
  • Chang Feng
    • 1
  1. 1.University of ReginaReginaCanada

Personalised recommendations