SPARQL Query Recommendation by Example: Assessing the Impact of Structural Analysis on Star-Shaped Queries

Authors Alessandro Adamou , Carlo Allocca , Mathieu d'Aquin , Enrico Motta

Thumbnail PDF


  • Filesize: 0.63 MB
  • 8 pages

Document Identifiers

Author Details

Alessandro Adamou
  • Data Science Institute, National University of Ireland Galway, Ireland
Carlo Allocca
  • Samsung Inc., London, United Kingdom
Mathieu d'Aquin
  • Data Science Institute, National University of Ireland Galway, Ireland
Enrico Motta
  • Knowledge Media Institute, The Open University, Milton Keynes, United Kingdom


This work was supported by the MK:Smart project (OU Ref. HGCK B4466).

Cite AsGet BibTex

Alessandro Adamou, Carlo Allocca, Mathieu d'Aquin, and Enrico Motta. SPARQL Query Recommendation by Example: Assessing the Impact of Structural Analysis on Star-Shaped Queries. In 2nd Conference on Language, Data and Knowledge (LDK 2019). Open Access Series in Informatics (OASIcs), Volume 70, pp. 1:1-1:8, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


One of the existing query recommendation strategies for unknown datasets is "by example", i.e. based on a query that the user already knows how to formulate on another dataset within a similar domain. In this paper we measure what contribution a structural analysis of the query and the datasets can bring to a recommendation strategy, to go alongside approaches that provide a semantic analysis. Here we concentrate on the case of star-shaped SPARQL queries over RDF datasets. The illustrated strategy performs a least general generalization on the given query, computes the specializations of it that are satisfiable by the target dataset, and organizes them into a graph. It then visits the graph to recommend first the reformulated queries that reflect the original query as closely as possible. This approach does not rely upon a semantic mapping between the two datasets. An implementation as part of the SQUIRE query recommendation library is discussed.

Subject Classification

ACM Subject Classification
  • Information systems → Semantic web description languages
  • query recommendation
  • query structure
  • dataset profiling


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Carlo Allocca, Alessandro Adamou, Mathieu d'Aquin, and Enrico Motta. SPARQL query recommendations by example. In Harald Sack, Giuseppe Rizzo, Nadine Steinmetz, Dunja Mladenic, Sören Auer, and Christoph Lange, editors, The Semantic Web - ESWC 2016 Satellite Events, Heraklion, Crete, Greece, May 29 - June 2, 2016, Revised Selected Papers, volume 9989 of Lecture Notes in Computer Science, pages 128-133, 2016. URL:
  2. Jørgen Bang-Jensen and Gregory Z. Gutin. Digraphs - theory, algorithms and applications. Springer, 2002. Google Scholar
  3. Lorenz Bühmann, Jens Lehmann, and Patrick Westphal. DL-Learner - A framework for inductive learning on the Semantic Web. J. Web Sem., 39:15-24, 2016. URL:
  4. William W. Cohen, Pradeep Ravikumar, and Stephen E. Fienberg. A Comparison of String Distance Metrics for Name-Matching Tasks. In IJCAI-03 Workshop on Information Integration on the Web (IIWeb-03), pages 73-78, 2003. URL:
  5. G. Correndo, M. Salvadores, I. Millard, H. Glaser, and N. Shadbolt. SPARQL query rewriting for implementing data integration over linked data. In Proceedings of the 2010 EDBT/ICDT Workshops, EDBT '10, NY, USA, 2010. ACM. URL:
  6. Mathieu d'Aquin and Enrico Motta. Extracting Relevant Questions to an RDF Dataset Using Formal Concept Analysis. In Proc. of the 6th K-CAP, USA, 2011. URL:
  7. Géraud Fokou, Stéphane Jean, Allel HadjAli, and Mickaël Baron. RDF query relaxation strategies based on failure causes. In The Semantic Web. Latest Advances and New Domains - 13th International Conference, ESWC 2016, Proceedings, pages 439-454, 2016. URL:
  8. Andrey Gubichev and Thomas Neumann. Exploiting the query structure for efficient join ordering in SPARQL queries. In 17th International Conference on Extending Database Technology, EDBT 2014, pages 439-450, 2014. URL:
  9. F. Picalausa and S. Vansummeren. What Are Real SPARQL Queries Like? In Proceedings of, SWIM '11, pages 7:1-7:6, New York, NY, USA, 2011. ACM. URL:
  10. B. R. Kuldeep Reddy and P. Sreenivasa Kumar. Efficient approximate SPARQL querying of Web of Linked Data. In 6th International Workshop on Uncertainty Reasoning for the Semantic Web (URSW 2010), collocated with ISWC-2010, pages 37-48, 2010. URL:
  11. Umberto Straccia and Raphaël Troncy. Towards Distributed Information Retrieval in the Semantic Web: Query Reformulation Using the oMAP Framework. In 3rd European Semantic Web Conference, ESWC 2006, Proceedings, pages 378-392, 2006. URL:
  12. Maria-Esther Vidal, Edna Ruckhaus, Tomas Lampo, Amadís Martínez, Javier Sierra, and Axel Polleres. Efficiently Joining Group Patterns in SPARQL Queries. In 7th Extended Semantic Web Conference, ESWC 2010, Proceedings, Part I, pages 228-242, 2010. URL:
  13. Gideon Zenz, Xuan Zhou, Enrico Minack, Wolf Siberski, and Wolfgang Nejdl. From keywords to semantic queries - Incremental query construction on the Semantic Web. J. Web Sem., 7(3):166-176, 2009. URL: