W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2004

Re: RDQL functionality vs. DAWG requirements

From: Eric Prud'hommeaux <eric@w3.org>
Date: Fri, 4 Jun 2004 05:50:38 +0900
To: Alberto Reggiori <alberto@asemantics.com>
Cc: Steve Harris <S.W.Harris@ecs.soton.ac.uk>, public-rdf-dawg@w3.org
Message-ID: <20040603205038.GB8052@w3.org>

On Tue, Jun 01, 2004 at 06:32:40PM +0200, Alberto Reggiori wrote:
> 
> 
> On Jun 1, 2004, at 6:01 PM, Steve Harris wrote:
> 
> >
> >On Tue, Jun 01, 2004 at 11:23:51 +0900, Eric Prud'hommeaux wrote:
> >>rdql- : 4.2 Provenance
> >
> >True, but several (3+) of the implementations have added a 4th member  
> >to
> >the pattern, eg:
> >
> >  SELECT ?vcard, ?source
> >  WHERE (?vcard vcard:FN "John Smith" ?source)
> >
> >will tell you the "source" of the statement.
> 
> +1
> 
> 4th component into triple-pattern would basically allow the user to  
> refer/pin-point and extract graph specific information (source,  
> provenance, context) - the graph itself could be seen as a resource  
> (and then further described), and the graph-name could either be a URI  
> qualified resource or bNode (typedNode perhaps). Such scenario turned  
> out to be quite common (and realistic) as soon as one starts to query  
> heterogeneous RDF federations (e.g. crawled overlapping RDF statements)
> 
> For another practical use-case of more than 3 components  
> triple-patterns in RDQL-like syntax see recent "Named Graphs" work  
> [1][2][3] - which seems somehow motivating this. Where in the published  
> papers/posters the syntax presented looks like the following:
> 
> SELECT ?x, ?y
> WHERE
> 	?a (?b rdf:type ex:Person .
> 	       ?b rdf:hasName ?x .
>                 ?b ex:homepage ?y)
> 	(?a dc:date ?c)
> AND  ?c > "1/1/2003"
> 
> '?a' would be the graph-name I guess
> 
> Annotea work seems also motivating this requirement - and implemented  
> in Algae (EricP?) - I guess Steve (us and others out there) got some  
> other real-world use-cases for this, if somebody is interested.

Annotea uses that feature of Algae2. Algae2, however, no longer uses a
fourth slot for provenance, as I was then tempted to have a 5th and
6th slot for object's data type and language. Instead, key words for
concepts like provenance, literal data type and literal language were
introduced to the constraints.  The syntax is (simplified a bit -- see
[4], [5], [6] for actual grammar):

  decl ::= triple ( '{' expr '}' ) *
  expr ::= ... | internalName '==' expr | ...
  internalName: '%' [a-zA-Z_][a-zA-Z0-9_-]*

I mention this 'cause I think that provenance is only one of several
facets of a triple we currently know we care about. (We may we
discover that we care about still more facets when we deal with
XMLLiterals.) Thus, I caution the working group away from using
positions to designate them.

In a large-ish query:

  ns rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  ns a=<http://www.w3.org/2000/10/annotation-ns#>
  ns http=<http://www.w3.org/1999/xx/http#>
  ns dc0=<http://purl.org/dc/elements/1.0/>
  ns dc1=<http://purl.org/dc/elements/1.1/>
  ask  (<http://foo> rdf:type         a:Annotation {%PROV == <http://bar>}.
        <http://foo> a:annotates      ?annotates.
        ( <http://foo> dc0:creator      ?creator ||
          <http://foo> dc1:creator      ?creator )
        ( <http://foo> dc0:date         ?date || 
          <http://foo> dc1:date         ?date )
        <http://foo> a:body           ?body {%PROV == <http://bar>}.
        ?body        http:Body        ?bodyData.
       )
  collect (?annotation ?body)

It's pretty easy to pick out %PROV, %DATATYPE, %LANG, %ENCODING...
See [7] for an example that uses %LANG and %ENCODING.

> and yes - it is very useful - even if still outside from the DAWG  
> "radar" unfortunately :)
> 
> Yours
> 
> Alberto
> 
> [1] http://www.w3.org/2004/03/trix/
> [2] http://www.wiwiss.fu-berlin.de/suhl/bizer/SWTSGuide/p747-bizer.pdf
> [3]  
> http://lists.w3.org/Archives/Public/www-archive/2004Feb/att-0072/swig- 
> bizer-carroll.pdf
[4] http://www.w3.org/2004/05/06-Algae/#expr
[5] http://www.w3.org/2004/05/06-Algae/#single
[6] http://www.w3.org/2004/05/06-Algae/#internalName
[7] http://dev.w3.org/cvsweb/perl/modules/W3C/Rdf/test/OrderTracking7-alg.sh?rev=1.3&content-type=text/x-cvsweb-markup
-- 
-eric

office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +1.857.222.5741

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.
Received on Thursday, 3 June 2004 16:50:37 GMT

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