W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > March 2015

Re: shapes-ISSUE-30 (shape-and-data-graphs): Are shapes and data in the same graph? [SHACL Spec]

From: Richard Cyganiak <richard@cyganiak.de>
Date: Sun, 29 Mar 2015 13:30:18 +0100
Cc: "public-data-shapes-wg@w3.org" <public-data-shapes-wg@w3.org>
Message-Id: <4EB1B2A0-B512-43E7-87D4-FBF4F1A0BC2A@cyganiak.de>
To: Holger Knublauch <holger@topquadrant.com>

> On 29 Mar 2015, at 08:19, Holger Knublauch <holger@topquadrant.com> wrote:
> Another aspect is that having to produce and parse new SPARQL strings repeatedly is very slow. Pre-binding a variable in an already parsed SPARQL query object is usually much faster.

That’s an implementation detail. Both your design and Peter’s can be implemented by parsing all the SPARQL stuff once, and then henceforth working with a structured representation of the template, like an ARQ Op tree.

> In my current design, templates can set a flag to indicate whether they also need to see the graph containing the constraint definitions in their WHERE clause. This means that most operations can be very fast, and only access the query graph. Other operations may need to see the constraints graph too, and these may be slower.

Wouldn’t this be better solved with named graphs? Have the data under validation in the default graph, and pass in a variable like ?constraintGraphName that could be used like this to access the constraint graph:

    GRAPH ?constraintGraphName { … }

Implementations could detect whether ?constraintGraphName is actually used in the template, and optimise the case where it’s not.

Received on Sunday, 29 March 2015 12:30:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:18 UTC