, Volume 23, Issue 1, pp 79–104 | Cite as

Query rewriting for semantic query optimization in spatial databases

  • Eduardo Mella
  • M. Andrea RodríguezEmail author
  • Loreto Bravo
  • Diego Gatica


Query processing is an important challenge for spatial databases due to the use of complex data types that represent spatial attributes. In particular, due to the cost of spatial joins, several optimization algorithms based on indexing structures exist. The work in this paper proposes a strategy for semantic query optimization of spatial join queries. The strategy detects queries with empty results and rewrites queries to eliminate unnecessary spatial joins or to replace spatial by thematic joins. This is done automatically by analyzing the semantics imposed by the database schema through topological dependencies and topological referential integrity constraints. In this way, the strategy comes to complement current state-of-art algorithms for processing spatial join queries. The experimental evaluation with real data sets shows that the optimization strategy can achieve a decrease in the time cost of a join query using indexing structures in a spatial database management system (SDBMS).


Spatial databases Semantic optimization Spatial query rewriting Spatial integrity constraints 



This work has been funded by Fondecyt 1170497 and by the Millennium Institute for Foundational Research on Data, Chile.


  1. 1.
    Popa L, Deutsch A, Tannen V (2005) Query Reformulation with ConstraintsGoogle Scholar
  2. 2.
    Aref Walid G, Samet Hanan (1991) Optimization for spatial query processing. In: 17th international conference on very large data bases, september 3-6, 1991, barcelona, catalonia, spain, proceedings, pp 81–90Google Scholar
  3. 3.
    Bogorny V, Engel PM, Alvares LOC (2005) Towards the reduction of spatial join for knowledge discovery in geographic databases using geo-ontologies and spatial integrity constraints. In: Proc of the ECML/PKDD second workshop on knowledge discovery and ontologies (KDO’2005), pp 51–58Google Scholar
  4. 4.
    Bravo L, Rodríguez AM (2012) Formalization and reasoning about spatial semantic integrity constraints. Data Knowl Eng 72:63–82CrossRefGoogle Scholar
  5. 5.
    Clementini E, Sharma J, Egenhofer MJ (1994) Modelling topological spatial relations: strategies for query processing. Comput Graph 18(6):815–822CrossRefGoogle Scholar
  6. 6.
    Deutsch A, Ludäscher B, Nash A (2007) Rewriting queries using views with access patterns under integrity constraints. Theor Comput Sci 371(3):200–226CrossRefGoogle Scholar
  7. 7.
    Deutsch A, Popa L, Tannen V (1999) Physical data independence, constraints, and optimization with universal plans. In: VLDB, pp 459–470Google Scholar
  8. 8.
    Deutsch A, Popa L, Tannen V (2006) Query reformulation with constraints. SIGMOD Rec 35(1):65–73CrossRefGoogle Scholar
  9. 9.
    Egenhofer M, Al-Taha K (1992) Reasoning about gradual change of topological relationships. In: Frank A, Campari I, Formentini U (eds) Theories and methods of spatio-temporal reasoning in geographic space, LNCS 636, Springer, pp 196–219Google Scholar
  10. 10.
    Egenhofer MJ, Franzosa RD (1991) Point-set topological spatial relations. Int J Geogr Inf Syst 5:161–174CrossRefGoogle Scholar
  11. 11.
    Egenhofer MJ, Herring J (1990) Categorizing binary topological relations between regions, lines and points in geographic databases, the 9-intersection. Formalism and its Use for Natural Language Spatial Predicates Santa Barbara CA National Center for Geographic Information and Analysis Technical Report 94:1–28Google Scholar
  12. 12.
    Egenhofer MJ (1994) Deriving the composition of binary topological relations. J Vis Lang Comput 5(2):133–149CrossRefGoogle Scholar
  13. 13.
    Grant J, Gryz J, Minker J, Raschid L (2000) Logic-based query optimization for object databases. IEEE Trans Knowl Data Eng 12(4):529–547CrossRefGoogle Scholar
  14. 14.
    Jacox EH, Samet H (2007) Spatial join techniques. ACM Trans Database Syst 32(1):7CrossRefGoogle Scholar
  15. 15.
    Lee SG, Henschen LJ, Chun J, Lee T (2000) Identifying relevant constraints for semantic query optimization. Inf Softw Technol 42(13):899–914CrossRefGoogle Scholar
  16. 16.
    Mamoulis N, Theodoridis Y, Papadias D (2005) Spatial joins: algorithms, cost models and optimization techniques. In: Manolopoulos Y, Papadopoulos A, Vassilakopoulos M (eds) Spatial databases: technologies, techniques and trends, idea group, pp 155–184Google Scholar
  17. 17.
    Maher MJ, Wang J (2000) Optimizing queries in extended relational databases. In: DEXA, vol 1873 of lecture notes in computer science. Springer, pp 386–396Google Scholar
  18. 18.
    OpenGis (1999) Opengis simple features specification for sql. Technical report Open GIS ConsortiumGoogle Scholar
  19. 19.
    Randell DA, Cui Z, Cohn AG (1992) A spatial logic based on regions and connection. In: KR, pp 165–176Google Scholar
  20. 20.
    Ray S, Simion B, Brown AD (2011) Jackpine: a benchmark to evaluate spatial database performance. In: Proceedings of the 27th international conference on data engineering. ICDE 2011, April 11-16, 2011, Hannover, Germany, pp 1139–1150Google Scholar
  21. 21.
    Stock O (1997) Spatial and temporal reasoning. Kluwer Acaddemic PublishersGoogle Scholar
  22. 22.
    Worboys M (1992) A geometric model for planar geographical objects. Int J Geogr Inf Syst 6(5):353–372CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  • Eduardo Mella
    • 1
  • M. Andrea Rodríguez
    • 1
    Email author
  • Loreto Bravo
    • 2
  • Diego Gatica
    • 1
  1. 1.Computer Science Department, Millenium Institute for Foundational Research on DataUniversidad de ConcepciónConcepciónChile
  2. 2.Data Science InstituteUniversidad del DesarrolloSantiagoChile

Personalised recommendations