W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2011

CONSTRUCT and abstract queries

From: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Date: Thu, 27 Jan 2011 14:51:49 +0000
Message-ID: <AANLkTi=vNFY-dhh2tHFU7opY4qZqSv0qaYbpimQJOCD3@mail.gmail.com>
To: SPARQL Working Group <public-rdf-dawg@w3.org>
Hi all,
I am currently writing about SPARQL and in particular about how a
SPARQL query can be translated into an abstract query. Doing this, I
was wondering about the CONSTRUCT query form. As far as I can see, the
template part of such a query is not at all part of the abstract
query, which would make it difficult to evaluate such an abstract
query properly. From the current and the SPARQL 1.0 spec, I would
translate the query:
CONSTRUCT { ?x a foaf:Person } WHERE	{ ?x foaf:name ?name }
(prefixes omitted) into the abstract query:
(E, D, CONSTRUCT) with E=toList(BGP(?x foaf:name ?name)) and D the
dataset of the SPARQL endpoint. This means, however, that  the
template is lost and I am not able to evaluate the query just by
working with the abstract query. Am I missing something?

If not, wouldn't it make sense to extend the algebra construction with
something like construct as a last step:
E:= Construct(E, template) if the query form is CONSTRUCT, where
template is the template of the construct query.

The evaluation of construct then could be defined as currently
outlined with an example, i.e., construct an RDF graph by
instantiating the template with all solutions.

In general, I think it wold be good to have at least a short paragraph
about the query forms in the section about query evaluation just
saying that you return the result of the evaluation for SELECT and
CONSTRUCT (if properly defined) and for ASK you return whether the
solution sequence obtained by the evaluation is empty or not. DESCRIBE
is anyway not precisely defined.

Best regards,
Birte

-- 
Dr. Birte Glimm, Room 309
Computing Laboratory
Parks Road
Oxford
OX1 3QD
United Kingdom
+44 (0)1865 283520
Received on Thursday, 27 January 2011 14:52:17 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:45 GMT