How (Well) Do Datalog, SPARQL and RIF Interplay?

  • Axel Polleres
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7494)


In this tutorial we will give an overview of the W3C standard query language for RDF – SPARQL – and its relation to Datalog as well as on the interplay with another W3C standard closely related to Datalog, the Rule Interchange Format (RIF). As we will learn – while these three interplay nicely on the surface and in academic research papers – some details within the W3C specs impose challenges on seamlessly integrating Datalog rules and SPARQL.


SPARQL Query Aggregate Function Path Query Query Engine Property Path 
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.
    Angles, R., Gutierrez, C.: The Expressive Power of SPARQL. In: Sheth, A.P., Staab, S., Dean, M., Paolucci, M., Maynard, D., Finin, T., Thirunarayan, K. (eds.) ISWC 2008. LNCS, vol. 5318, pp. 114–129. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Angles, R., Gutierrez, C.: Subqueries in SPARQL. In: Proceedings of the 5th Alberto Mendelzon International Workshop on Foundations of Data Management (AMW2011), Santiago, Chile. CEUR Workshop Proceedings, vol. 749. (May 2011)Google Scholar
  3. 3.
    Arenas, M., Conca, S., Pérez, J.: Counting beyond a yottabyte, or how sparql 1.1 property paths will prevent adoption of the standard. In: Proceedings of the 21st World Wide Web Conference (WWW 2012), Lyon, France, pp. 629–638. ACM (April 2012)Google Scholar
  4. 4.
    Bizer, C., Schultz, A.: The R2R framework: Publishing and discovering mappings on the web. In: 1st International Workshop on Consuming Linked Data (COLD 2010), Shanghai, China (November 2010)Google Scholar
  5. 5.
    Boley, H., Hallmark, G., Kifer, M., Paschke, A., Polleres, A., Reynolds, D.: RIF Core Dialect. W3C recommendation, W3C (June 2010),
  6. 6.
    Brickley, D., Guha, R., McBride, B. (eds.): RDF Vocabulary Description Language 1.0: RDF Schema. Technical report, W3C (February 2004), W3C Recommendation.Google Scholar
  7. 7.
    Faber, W., Leone, N., Pfeifer, G.: Recursive Aggregates in Disjunctive Logic Programs: Semantics and Complexity. In: Alferes, J.J., Leite, J. (eds.) JELIA 2004. LNCS (LNAI), vol. 3229, pp. 200–212. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  8. 8.
    Glimm, B., Ogbuji, C., Hawke, S., Herman, I., Parsia, B., Polleres, A., Seaborne, A.: SPARQL 1.1 Entailment Regimes. W3C working draft, W3C (January 2012),
  9. 9.
    Knublauch, H., Hendler, J.A., Idehen, K.: SPIN - Overview and Motivation (February 2011); W3C member submissionGoogle Scholar
  10. 10.
    Losemann, K., Martens, W.: The complexity of evaluating path expressions in sparql. In: Proceedings of the 31st ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS 2012), Scottsdale, AZ, USA, pp. 101–112. ACM (May 2012)Google Scholar
  11. 11.
    Motik, B., Grau, B.C., Horrocks, I., Wu, Z., Fokoue, A., Lutz, C., Calvanese, D., Carroll, J., De Giacomo, G., Hendler, J., Herman, I., Parsia, B., Patel-Schneider, P.F., Ruttenberg, A., Sattler, U., Schneider, M.: OWL 2 Web Ontology Language Profiles. W3C recommendation, W3C (October 2009),
  12. 12.
    Mumick, I.S., Shmueli, O.: Finiteness properties of database queries. In: 4th Australian Database Conference (1993)Google Scholar
  13. 13.
    Pérez, J., Arenas, M., Gutierrez, C.: Semantics and Complexity of SPARQL. In: Cruz, I., Decker, S., Allemang, D., Preist, C., Schwabe, D., Mika, P., Uschold, M., Aroyo, L.M. (eds.) ISWC 2006. LNCS, vol. 4273, pp. 30–43. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  14. 14.
    Pérez, J., Arenas, M., Gutierrez, C.: Semantics and complexity of SPARQL. ACM Transactions on Database Systems, 34(3), Article 16, 45 pages (2009)Google Scholar
  15. 15.
    Polleres, A.: From SPARQL to rules (and back). In: Proceedings of the 16th World Wide Web Conference (WWW 2007), Banff, Canada, pp. 787–796. ACM Press (May 2007)Google Scholar
  16. 16.
    Polleres, A., Boley, H., Kifer, M.: RIF Datatypes and Built-Ins 1.0. W3C recommendation, W3C (May 2010),
  17. 17.
    Polleres, A., Scharffe, F., Schindlauer, R.: SPARQL++ for Mapping Between RDF Vocabularies. In: Meersman, R., Tari, Z. (eds.) OTM 2007, Part I. LNCS, vol. 4803, pp. 878–896. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  18. 18.
    Polleres, A., Schindlauer, R.: dlvhex-sparql: A SPARQL-compliant query engine based on dlvhex. In: 2nd International Workshop on Applications of Logic Programming to the Web, Semantic Web and Semantic Web Services (ALPSWS 2007), Porto, Portugal. CEUR Workshop Proceedings, vol. 287, pp. 3–12. (September 2007)Google Scholar
  19. 19.
    Prud’hommeaux, E., Seaborne, A.: SPARQL Query Language for RDF. W3c recommendation, W3C (January 2008),
  20. 20.
    Schenk, S., Staab, S.: Networked graphs: A declarative mechanism for sparql rules, sparql views and rdf data integration on the web. In: Proceedings WWW 2008, Beijing, China, pp. 585–594. ACM Press (2008)Google Scholar
  21. 21.
    Seaborne, A., Harris, S.: SPARQL 1.1 Query Language. W3C working draft, W3C (January 2012),

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Axel Polleres
    • 1
  1. 1.Siemens AG ÖsterreichViennaAustria

Personalised recommendations