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

Re: CONSTRUCT and abstract queries

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Tue, 01 Feb 2011 12:12:29 +0000
Message-ID: <4D47F8AD.90408@epimorphics.com>
To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
Birte,

Yes - the translation is for the graph pattern part only.  It would be 
good to define template substitution in this section and that could then 
be referenced by SPARQL Update from it's formal description.

	Andy

On 27/01/11 14:51, Birte Glimm wrote:
> 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
>
Received on Tuesday, 1 February 2011 12:13:06 GMT

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