Termination properties of spatial Datalog programs

  • Bart Kuijpers
  • Jan Paredaens
  • Marc Smits
  • Jan Van den Bussche
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1154)


We consider spatial databases defined in terms of polynomial inequalities, and investigate the use of Datalog as a query language for such databases. Recursive programs are not guaranteed to terminate in this setting. Through a series of examples we show that useful restrictions on the databases under consideration or on the syntax of allowed programs, guaranteeing termination, are unlikely to exist. Hence, termination of particular recursive spatial queries must be established by ad-hoc arguments, if it can be established at all. As an illustration of the difficulties that can be encountered in this respect we discuss the topological connectivity query.


Query Language Transitive Closure Spatial Database Quantifier Elimination Polynomial Inequality 
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.
    D.S. Arnon. Geometric reasoning with logic and algebra. Artificial Intelligence, 37:37–60, 1988.Google Scholar
  2. 2.
    M. Benedikt, G. Dong, L. Libkin, and L. Wong. Relational expressive power of constraint query languages. In Proceedings 15th ACM Symposium on Principles of Database Systems. ACM Press, 1996.Google Scholar
  3. 3.
    J. Bochnak, M. Coste, and M.-F. Roy. Géométrie algébrique réelle. Springer-Verlag, 1987.Google Scholar
  4. 4.
    G.E. Collins. Quantifier elimination for real closed fields by cylindrical algebraic decomposition. Lecture Notes in Computer Science, 33:134–183, 1975.Google Scholar
  5. 5.
    M. Coste. Ensembles semi-algébriques. In Géometrie algébrique réelle et formes quadratiques, volume 959 of Lecture Notes in Mathematics, pages 109–138. Springer, 1982.Google Scholar
  6. 6.
    S. Grumbach and J. Su. First-order definability over constraint databases. In Montanari and Rossi [10], pages 121–136.Google Scholar
  7. 7.
    M. Gyssens, J. Paredaens, J. Van den Bussche, and D. Van Gucht. Computable queries for spatial database systems. In preparation.Google Scholar
  8. 8.
    P.C. Kanellakis, G.M. Kuper, and P.Z. Revesz. Constraint query languages. Journal of Computer and System Sciences, 51(1):26–52, August 1995.Google Scholar
  9. 9.
    E.E. Moise. Geometric topology in dimensions 2 and 3, volume 47 of Graduate Texts in Mathematics. Springer, 1977.Google Scholar
  10. 10.
    U. Montanari and F. Rossi, editors. Principles and practice of constraint programming, volume 976 of Lecture Notes in Computer Science. Springer, 1995.Google Scholar
  11. 11.
    J. Paredaens, J. Van den Bussche, and D. Van Gucht. Towards a theory of spatial database queries. In Proceedings 13th ACM Symposium on Principles of Database Systems, pages 279–288. ACM Press, 1994.Google Scholar
  12. 12.
    J. Renegar. On the computational complexity and geometry of the first-order theory of the reals. Journal of Symbolic Computation, 13, 1992.Google Scholar
  13. 13.
    P.Z. Revesz. A closed-form evaluation for Datalog queries with integer (gap)-order constraints. Theoretical Computer Science, 116:117–149, 1993.Google Scholar
  14. 14.
    P.Z. Revesz. Safe stratified Datalog with integer order programs. In Montanari and Rossi [10], pages 154–169.Google Scholar
  15. 15.
    J.T. Schwartz and M. Sharir. On the piano movers' problem II. In J.T. Schwartz, M. Sharir, and J. Hopcroft, editors, Planning, Geometry, and Complexity of Robot Motion, pages 51–96. Ablex Publishing Corporation, Norwood, New Jersey, 1987.Google Scholar
  16. 16.
    A. Tarski. A Decision Method for Elementary Algebra and Geometry. University of California Press, 1951.Google Scholar
  17. 17.
    J. Ullman. Principles of Database and Knowledge-Base Systems, volume I. Computer Science Press, 1988.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Bart Kuijpers
    • 1
  • Jan Paredaens
    • 1
  • Marc Smits
    • 1
  • Jan Van den Bussche
    • 1
  1. 1.InformaticaUniversity of AntwerpAntwerpenBelgium

Personalised recommendations