XQuery/The Emp-Dept case study

The Employee-Department case study used in the comparison of XQuery from SQL is used here to explore the XQuery/SPARQL pairing.

Conversion to RDFEdit

Taking as the starting point the XML documents defining the three tables:

These documents are converted to RDF using an XQuery script guided by a mapping file. The generated RDF is cached. and accessed by an XQuery script to de-reference the resource URIs.

Individual resource URIs are re-written in Apache to calls on an XQuery script which retrieves the fragment of RDF from the cached file. Thus;

This should be replaced by a query on the SPARQL endpoint.

RDF browsingEdit

This RDF can be browsed with and RDF browser such as Disco , OpenLink RDF browser OpenLink Data Explorer or Tabulator as an add-in to Opera or Firefox

Querying with SPARQLEdit

The RDF can be queried with SPARQL. The same queries uses in the SQL /XQuery example are expressed in SPARQL in this tutorial