W3C home > Mailing lists > Public > semantic-web@w3.org > June 2007

Re: SPARQL query JSON/XML source formats

From: Richard Newman <r.newman@reading.ac.uk>
Date: Thu, 14 Jun 2007 20:01:30 -0700
Message-Id: <6BEE3671-8494-4F85-9DB5-D40C1257BDC9@reading.ac.uk>
Cc: carmen <_@whats-your.name>, semantic-web@w3.org
To: Joshua Tauberer <jt@occams.info>

> I've always wondered why SPARQL or other RDF queries were not  
> represented in RDF.....

... because RDF isn't particularly human-writable, syntax helps a lot  
of people when they're writing, and SPARQL wouldn't benefit a great  
deal from extensibility*.

It also appears that SPARQL's design goals included "looking like SQL".

Certainly, it's easier to write something like

SELECT * { ?x a ?y }


[ a sparql:Query ;
   sparql:vars sparql:all ;
   sparql:queryBody [
     a sparql:BasicGraphPattern ;
     sparql:patterns (
       [ a sparql:Pattern ;
         sparql:subject [ a sparql:Variable;
                          sparql:label "x" ] ;
         sparql:predicate rdf:type ;
         sparql:object [ a sparql:Variable;
                         sparql:label "y" ] ) ] ]

Now, why SPARQL has a free-text syntax rather than s-expressions is  
something that many of us have wondered for a long time...


* extensibility might let you do all sorts of things, but it would  
hinder interoperability of queries, which wouldn't be beneficial  
(particularly early in SPARQL's life).
Received on Friday, 15 June 2007 03:02:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:57 UTC