Skip to main content

RAL: An Algebra for Querying RDF


To make the World Wide Web machine-understandable there is a strong demand both for languages describing metadata and for languages querying metadata. The Resource Description Framework (RDF), a language proposed by W3C, can be used for describing metadata about (Web) resources. RDF Schema (RDFS) extends RDF by providing means for creating application specific vocabularies (ontologies). While the two above languages are widely acknowledged as a standard means for describing Web metadata, a standardized language for querying RDF metadata is still an open issue. Research groups coming both from industry and academia are presently involved in proposing several RDF query languages. Due to the lack of an RDF algebra such query languages use APIs to describe their semantics and optimization issues are mostly neglected. This paper proposes RAL (an RDF algebra) as a reference mathematical study for RDF query languages and for performing RDF query optimization. We define the data model, we present the operators to manipulate the data, and we address the application of RAL for query optimization. RAL includes: extraction operators to retrieve the needed resources from the input RDF model, loop operators to support repetition, and construction operators to build the resulting RDF model.

This is a preview of subscription content, access via your institution.


  1. D. Allsopp, P. Beautement, J. Carson, and M. Kirton, “Towards semantic interoperability in agent-based coalition command systems,” in The First Semantic Web Working Symposium, 2002.

  2. D. Beckett, “RDF/XML syntax specification (revised),” W3C Working Draft, 23 January 2003,, 2003.

  3. D. Beckett, “Redland RDF application framework,”, 2003.

  4. C. Beeri and Y. Kornatzky, “Algebraic optimization of object-oriented query languages,” Theoretical Computer Science 116(1–2), 1993, 59–94.

    Google Scholar 

  5. A. Berglund, S. Boag, D. Chamberlin, M. F. Fernandez, M. Kay, J. Robie, and J. Simeon, “XML path language (XPath) 2.0,” W3C Working Draft, 15 November 2002,, 2002.

  6. T. Berners-Lee, “What the semantic Web can represent,” W3C, 1998,, 1998.

  7. T. Berners-Lee, Weaving the Web, Harper, San Francisco, 1999.

    Google Scholar 

  8. P. V. Biron and A. Malhotra, “XML schema, part 2: Datatypes,” W3C Recommendation, 02 May 2001,, 2001.

  9. S. Boag, D. Chamberlin, M. F. Fernandez, D. Florescu, J. Robie, and J. Simeon, “XQuery 1.0: An XML query language,” W3C Working Draft, 15 November 2002,, 2002.

  10. D. Brickley and R. V. Guha, “RDF vocabulary description language 1.0: RDF schema,” W3C Working Draft, 23 January 2003,, 2003.

  11. R. G. G. Catell, K. D. Barry, M. Berler, J. Eastman, D. Jordan, C. Russell, O. Schadow, T. Stanienda, and F. Velez, The Object Data Standard: ODMG 3.0, Morgan Kaufmann, San Mateo, CA, 2000.

    Google Scholar 

  12. D. Connolly, F. van Harmelen, I. Horrocks, D. L. McGuinness, P. F. Patel-Schneider, and L. A. Stein, “DAML+OIL (March 2001) reference description,” W3C Note 18, December 2001,, 2001.

  13. S. Decker, D. Brickley, J. Saarela, and J. Angele, “A query and inference service for RDF,” in The W3C Query Languages Workshop, html, 1998.

  14. S. Decker, S. Melnik, F. Van Harmelen, D. Fensel, M. Klein, J. Broekstra, M. Erdmann, and I. Horrocks, “The semantic Web: The roles of XML and RDF,” IEEE Internet Computing 4(5) 2000, 63–74.

    Google Scholar 

  15. F. Frasincar, G. J. Houben, and C. Pau, “XAL: An algebra for XML query optimization,” in Database Technologies 2002, Thirteenth Australasian Database Conference, Conferences in Research and Practice in Information Technology, Vol. 5, 2002, pp. 49–56.

    Google Scholar 

  16. J. Grant and D. Beckett, “RDF test cases,” W3C Working Draft, 23 January 2003,, 2003.

  17. R. V. Guha, “RdfDB query language,”, 2000.

  18. R. V. Guha, O. Lassila, E. Miller, and D. Brickley, “Enabling inferencing,” in The W3C Query Languages Workshop,, 1998.

  19. P. Hayes, “RDF semantics,” W3C Working Draft, 23 January 2003,, 2003.

  20. Intellidimension Inc., “RDFQL query language reference,”, 2002.

  21. G. Karvounarakis, V. Christophides, D. Plexousakis, and S. Alexaki, “Querying RDF descriptions for community web portals,” in 17iemes Journees Bases de Donnees Avancees, 2001, pp. 133–144.

  22. M. Kay, “XSL Transformations (XSLT) version 2.0,” W3C Working Draft 15, November 2002,, 2002.

  23. G. Klyne, and J. J. Carroll, “Resource Description Framework (RDF): concepts and abstract syntax,” W3C Working Draft, 23 January 2003,, 2003.

  24. S. Kokkelink, “Transforming RDF with RDFPath,” Working Draft, http://zoe.mathematik.UniRAL: Osnabrueck.DE/QAT/Transform/RDFTransform.pdf, 2001.

  25. O. Lassila, “Enabling semantic Web programming by integrating RDF and common lisp,” in The First Semantic Web Working Symposium, 2001, pp. 403–410.

  26. O. Lassila and R. R. Swick, “Resource description framework (RDF) model and syntax specification,” W3C Recommendation, 22 February 1999,, 1999.

  27. A. Malhotra and N. Sundaresan, “RDF query specification,” in The W3C Query Languages Workshop,, 1998.

  28. M. Marchiori and J. Saarela, “Query +Metadata + Logic =Metalog,”, 1998.

  29. B. McBride, “Jena: Implementing the RDF model and syntax specification,” in Second International Workshop on the Semantic Web, 2001.

  30. S. Melnik, “Algebraic specification for RDF models,” Working Draft,, 1999.

  31. S. Melnik, “RDF API draft,” melnik/rdf/api.html, 2001.

  32. L. Miller, “Inkling: RDF query using SquishQL,”, 2002.

  33. E. Prud'hommeaux, “Algae HOWTO,” W3C, User/Algae-HOWTO.html, 2002.

  34. A. Seaborne, “RDQL—A data oriented query language for RDF models,” HP Labs,, 2001.

  35. M. Sintek and S. Decker, “TRIPLE—an RDF query, inference, and transformation language,” in The Semantic Web—ISWC 2002, First International Semantic Web Conference, Lecture Notes in Computer Science, Vol. 2342, 2002, pp. 364–378.

  36. H. S. Thompson, D. Beech, M. Maloney, and N. Mendelsohn, “XML schema, Part 1: Structures,” W3C Recommendation, 02 May 2001,, 2001.

  37. J. D. Ullman, Principles of Database and Knowledge-Base Systems, Vols. 1–2, Computer Science Press, 1989.

  38. F. van Harmelen, J. Hendler, I. Horrocks, D. L. McGuinness, P. F. Patel-Schneider, and L. A. Stein, “Web ontology language (OWL) reference version 1.0,” W3CWorking Draft, 21 February 2003,, 2003.

  39. P. Wadler, “Comprehending monads,” Mathematical Structures in Computer Science 2(4) 1992, 461–493.

    Google Scholar 

Download references

Author information

Authors and Affiliations


Rights and permissions

Reprints and Permissions

About this article

Cite this article

Frasincar, F., Houben, GJ., Vdovjak, R. et al. RAL: An Algebra for Querying RDF. World Wide Web 7, 83–109 (2004).

Download citation

  • Issue Date:

  • DOI:

  • RDF(S)
  • RDF(S) query language
  • RDF(S) algebra