skip to main content
research-article

Optimisation Techniques for Flexible SPARQL Queries

Published:16 November 2022Publication History
Skip Abstract Section

Abstract

Resource Description Framework datasets can be queried using the SPARQL language but are often irregularly structured and incomplete, which may make precise query formulation hard for users. The SPARQLAR language extends SPARQL 1.1 with two operators—APPROX and RELAX—to allow flexible querying over property paths. These operators encapsulate different dimensions of query flexibility, namely, approximation and generalisation, and they allow users to query complex, heterogeneous knowledge graphs without needing to know precisely how the data is structured. Earlier work has described the syntax, semantics, and complexity of SPARQLAR, has demonstrated its practical feasibility, but has also highlighted the need for improving the speed of query evaluation. In the present article, we focus on the design of two optimisation techniques targeted at speeding up the execution of SPARQLAR queries and on their empirical evaluation on three knowledge graphs: LUBM, DBpedia, and YAGO. We show that applying these optimisations can result in substantial improvements in the execution times of longer-running queries (sometimes by one or more orders of magnitude) without incurring significant performance penalties for fast queries.

REFERENCES

  1. [1] Alkhateeb Faisal, Baget Jean-François, and Euzenat Jérôme. 2009. Extending SPARQL with regular expression patterns (for querying RDF). Web Semant. 7, 2 (Apr. 2009), 5773. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. [2] Almendros-Jimenez J. M., Luna A., and Moreno G.. 2014. Fuzzy XPath queries in XQuery. In Proceedings of the OTM (2014). 457472.Google ScholarGoogle ScholarCross RefCross Ref
  3. [3] Amer-Yahia S., Lakshmanan L. V. S., and Pandit S.. 2004. FleXPath: Flexible structure and full-text querying for XML. In Proceedings of the ACM SIGMOD 2004. 8394.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. [4] Angles Renzo and Gutierrez Claudio. 2008. The expressive power of SPARQL. In Proceedings of the ISWC. Springer-Verlag, Berlin, 114129. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. [5] Babcock B., Chaudhuri S., and Das G.. 2003. Dynamic sample selection for approximate query processing. In Proceedings of the ACM SIGMOD 2003. 539550.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. [6] Bizer Christian, Cyganiak Richard, and Heath Tom. 2007. How to publish Linked Data on the Web. Retrieved from http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/.Google ScholarGoogle Scholar
  7. [7] Blume Till, Richerby David, and Scherp Ansgar. 2021. FLUID: A common model for semantic structural graph summaries based on equivalence relations. Theoret. Comput. Sci. 854 (2021), 136158.Google ScholarGoogle ScholarCross RefCross Ref
  8. [8] Bordogna G. and Psaila G.. 2008. Customizable flexible querying in classical relational databases. In Handbook of Research on Fuzzy Information Processing in Databases. IGI Global, 191217.Google ScholarGoogle ScholarCross RefCross Ref
  9. [9] Bosc P., Hadjali A., and Pivert O.. 2009. Incremental controlled relaxation of failing flexible queries. J. Intell. Info. Syst. 33, 3 (2009), 261283.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. [10] Bosc P. and Pivert O.. 1992. Some approaches for relational databases flexible querying. J. Intell. Info. Syst. 1, 3 (1992), 323354.Google ScholarGoogle ScholarCross RefCross Ref
  11. [11] Buratti G. and Montesi D.. 2008. Ranking for approximated XQuery full-text queries. In Proceedings of the BNCOD. 165176.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. [12] Calì Andrea, Frosini Riccardo, Poulovassilis Alexandra, and Wood Peter T.. 2014. Flexible querying for SPARQL. In Proceedings of the OTM Confederated International Conferences: CoopIS and ODBASE. 473490. Google ScholarGoogle ScholarCross RefCross Ref
  13. [13] Calvanese Diego, Giacomo Giuseppe De, Lenzerini Maurizio, and Vardi Moshe Y.. 2000. Containment of conjunctive regular path queries with inverse. In Proceedings of the KR. 176185.Google ScholarGoogle Scholar
  14. [14] Calvanese Diego, Giacomo Giuseppe De, Lenzerini Maurizio, and Vardi Moshe Y.. 2003. Reasoning on regular path queries. SIGMOD Rec. 32, 4 (Dec. 2003), 8392. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. [15] Čebirić Šejla, Goasdoué François, Kondylakis Haridimos, Kotzinos Dimitris, Manolescu Ioana, Troullinou Georgia, and Zneika Mussab. 2019. Summarizing semantic graphs: A survey. VLDB J. 28, 3 (June 2019), 295327.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. [16] Cedeno J. P. and Candan K. S.. 2011. R2DF framework for ranked path queries over weighted RDF graphs. In Proceedings of the WIMS. 112.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. [17] Chakrabarti K., Garofalakis M., Rastogi R., and Shim K.. 2001. Approximate query processing using wavelets. VLDB J. 10, 2–3 (2001), 199223.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. [18] Chu W. W., Yang H., Chiang K., Minock M., Chow G., and Larson C.. 1996. CoBase: A scalable and extensible cooperative information system. J. Intell. Info. Syst. 6, 2/3 (1996), 223259.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. [19] Virgilio Roberto De, Maccioni Antonio, and Torlone Riccardo. 2013. A similarity measure for approximate querying over RDF data. In Proceedings of the EDBT/ICDT. 205213.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. [20] Virgilio Roberto De, Maccioni Antonio, and Torlone Riccardo. 2015. A unified framework for flexible query answering over heterogeneous data sources. In Proceedings of the FQAS. 283294.Google ScholarGoogle Scholar
  21. [21] Dolog P., Stuckenschmidt H., Wache H., and Diederich J.. 2009. Relaxing RDF queries based on user and domain preferences. J. Intell. Info. Syst. 33, 3 (2009), 239260.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. [22] Elbassuoni S., Ramanath M., and Weikum G.. 2011. Query relaxation for entity-relationship search. In Proceedings of the ESWC. 6276.Google ScholarGoogle ScholarCross RefCross Ref
  23. [23] Figueira Diego, Godbole Adwait, Krishna S., Martens Wim, Niewerth Matthias, and Trautner Tina. 2020. Containment of simple conjunctive regular path queries. In Proceedings of the KR. 371380.Google ScholarGoogle ScholarCross RefCross Ref
  24. [24] Fink R. and Olteanu D.. 2011. On the optimal approximation of queries using tractable propositional languages. In Proceedings of the ICDT’11. 174185.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. [25] Fletcher George, Poulovassilis Alexandra, Selmer Petra, and Wood Peter T.. 2019. Approximate querying for the property graph language cypher. In Proceedings of the IEEE BigData. IEEE, 617622.Google ScholarGoogle ScholarCross RefCross Ref
  26. [26] Florescu Daniela, Levy Alon, and Suciu Dan. 1998. Query containment for conjunctive queries with regular expressions. In Proceedings of thePODS. ACM, New York, NY, 139148. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. [27] Frosini Riccardo. 2017. Flexible Query Processing of SPARQL Queries. PhD Thesis.Google ScholarGoogle Scholar
  28. [28] Frosini Riccardo, Calì Andrea, Poulovassilis Alexandra, and Wood Peter T.. 2017. Flexible query processing for SPARQL. Semantic Web 8, 4 (2017), 533563.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. [29] Galindo J., Medina J. M., Pons O., and Cubero C.. 1998. A server for fuzzy SQL queries. In Proceedings of the FQAS. 164174.Google ScholarGoogle ScholarCross RefCross Ref
  30. [30] Grahne Gösta and Thomo Alex. 2006. Regular path queries under approximate semantics. Ann. Math. Artif. Intell. 46, 1–2 (2006), 165190.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. [31] Harris S. and Seaborne A.. 2013. SPARQL 1.1 Query Language. W3C Recommendation.Google ScholarGoogle Scholar
  32. [32] Heer J., Agrawala M., and Willett M.. 2008. Generalized selection via interactive query relaxation. In Proceedings of the CHI. 959968.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. [33] Hill J., Torson J., Guo B., and Chen Z.. 2010. Toward ontology-guided knowledge-driven XML query relaxation. In Proceedings of the CIMSiM. 448453.Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. [34] Hogan A., Mellotte M., Powell G., and Stampouli D.. 2012. Towards fuzzy query relaxation for RDF. In Proceedings of the ISWC. 687702.Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. [35] Huang H. and Liu C.. 2010. Query relaxation for star queries on RDF. In Proceedings of the WISE. 376389.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. [36] Huang H., Liu C., and Zhou X.. 2008. Computing relaxed answers on RDF databases. In Proceedings of the WISE. 163175.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. [37] Hurtado Carlos A., Poulovassilis Alexandra, and Wood Peter T.. 2008. Query relaxation in RDF. J. Data Semant. X (2008), 3161.Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. [38] Hurtado Carlos A., Poulovassilis Alexandra, and Wood Peter T.. 2009. Ranking approximate answers to semantic web queries. In Proceedings of the ESWC. 263277.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. [39] Ioannidis Y. and Poosala V.. 1999. Histogram-based approximation of set-valued query-answers. In Proceedings of the VLDB. 174185.Google ScholarGoogle Scholar
  40. [40] Kaushik Raghav, Shenoy Pradeep, Bohannon Philip, and Gudes Ehud. 2002. Exploiting local similarity for indexing paths in graph-structured data. In Proceedings of the 18th ICDE. 129140.Google ScholarGoogle ScholarCross RefCross Ref
  41. [41] Kellou-Menouer Kenza, Kardoulakis Nikolaos, Troullinou Georgia, Kedad Zoubida, Plexousakis Dimitris, and Kondylakis Haridimos. 2021. A survey on semantic schema discovery. VLDB J. (2021), 136.Google ScholarGoogle Scholar
  42. [42] Kiefer Christoph, Bernstein Abraham, and Stocker Markus. 2007. The fundamentals of iSPARQL: A virtual triple approach for similarity-based semantic web tasks. In Proceedings of the ISWC. 295309.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. [43] Kostylev Egor V., Reutter Juan L., Romero Miguel, and Vrgoč Domagoj. 2015. SPARQL with property paths. In Proceedings of the ISWC (Lecture Notes in Computer Science), Arenas Marcelo et al. (Eds.), Vol. 9366. Springer, 318.Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. [44] Liu C., Li J., Yu J. X., and Zhou R.. 2010. Adaptive relaxation for querying heterogeneous XML data sources. Info. Syst. 35, 6 (2010), 688707.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. [45] Liu Yike, Safavi Tara, Dighe Abhilash, and Koutra Danai. 2018. Graph summarization methods and applications: A survey. ACM Comput. Surv. 51, 3, Article 62 (June 2018), 34 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. [46] Mailis Theofilos, Kotidis Yannis, Nikolopoulos Vaggelis, Kharlamov Evgeny, Horrocks Ian, and Ioannidis Yannis. 2019. An efficient index for RDF query containment. In Proceedings of the ICMD. ACM, New York, NY, 14991516.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. [47] Mandreoli F., Martoglia R., Villani G., and Penzo W.. 2009. Flexible query answering on graph-modeled data. In Proceedings of the EDBT. 216227.Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. [48] Meng X., Ma Z. M., and Yan L.. 2008. Providing flexible queries over web databases. In Knowledge-Based Intelligent Information and Engineering Systems. Springer, 601606.Google ScholarGoogle Scholar
  49. [49] Mohri Mehryar, Moreno Pedro, and Weinstein Eugene. 2007. Factor automata of automata and applications. In Implementation and Application of Automata, Holub Jan and Žďárek Jan (Eds.). Springer, Berlin, 168179.Google ScholarGoogle ScholarCross RefCross Ref
  50. [50] Muñoz Sergio, Pérez Jorge, and Gutierrez Claudio. 2007. Minimal deductive systems for RDF. In Proceedings of theESWC. Springer-Verlag, Berlin, 5367. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. [51] Na S. and Park S.. 1996. A process of fuzzy query on new fuzzy object oriented data model. In Proceedings of the DEXA. 500509.Google ScholarGoogle ScholarCross RefCross Ref
  52. [52] Pérez Jorge, Arenas Marcelo, and Gutierrez Claudio. 2009. Semantics and complexity of SPARQL. ACM Trans. Database Syst. 34, 3, Article 16 (Sept. 2009), 45 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. [53] Pichler Reinhard and Skritek Sebastian. 2014. Containment and equivalence of well-designed SPARQL. In Proceedings of the ACM SIGMOD-SIGACT-SIGART. 3950.Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. [54] Pivert Olivier, Slama Olfa, and Thion Virginie. 2016. SPARQL extensions with preferences: A survey. In Proceedings of the SIGAPP. 10151020.Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. [55] Poulovassilis Alexandra, Selmer Petra, and Wood Peter T.. 2016. Approximation and relaxation of semantic web path queries. J. Web Semant. 40 (2016), 121.Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. [56] Poulovassilis Alexandra and Wood Peter T.. 2010. Combining approximation and relaxation in semantic web path queries. In Proceedings of the ISWC. 631646.Google ScholarGoogle ScholarCross RefCross Ref
  57. [57] Reddy B. R. K. and Kumar P. S.. 2010. Efficient approximate SPARQL querying of web of linked data. In Proceedings of the URSW. 3748.Google ScholarGoogle Scholar
  58. [58] Schmidt Michael. 2009. Foundations of SPARQL Query Optimization. Ph.D. Dissertation. Albert-Ludwigs-Universitat Freiburg. Retrieved from http://www.informatik.uni-freiburg.de/mschmidt/docs/diss_final01122010.pdf.Google ScholarGoogle Scholar
  59. [59] Theobald M., Schenkel R., and Weikum G.. 2005. An efficient and versatile query engine for TopX search. In Proceedings of the VLDB. 625636.Google ScholarGoogle Scholar
  60. [60] Yang S., Wu Y., Yan X. Sun, and H.. 2014. Schemaless and structureless graph querying. Proc. VLDB Endow. 7, 7 (2014), 565576.Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. [61] Zheng Weiguo, Zou Lei, Peng Wei, Yan Xifeng, Song Shaoxu, and Zhao Dongyan. 2016. Semantic SPARQL similarity search over RDF knowledge graphs. Proc. VLDB 9, 11 (2016), 840851.Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. [62] Zhou X., Gaugaz J., Balke W.-T., and Nejdl W.. 2007. Query relaxation using malleable schemas. In Proceedings of the ACM SIGMOD. 545556.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Optimisation Techniques for Flexible SPARQL Queries

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM Transactions on the Web
          ACM Transactions on the Web  Volume 16, Issue 4
          November 2022
          165 pages
          ISSN:1559-1131
          EISSN:1559-114X
          DOI:10.1145/3571715
          Issue’s Table of Contents

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 16 November 2022
          • Online AM: 24 June 2022
          • Accepted: 14 June 2022
          • Revised: 26 April 2022
          • Received: 21 September 2021
          Published in tweb Volume 16, Issue 4

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Refereed
        • Article Metrics

          • Downloads (Last 12 months)166
          • Downloads (Last 6 weeks)4

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Full Text

        View this article in Full Text.

        View Full Text

        HTML Format

        View this article in HTML Format .

        View HTML Format
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!