SeRQL evaluation

SeRQL is part of Sesame [1].  This note is based on the online user manual
for SeRQL [2] and the Sesame protocol [3] as of May 25, 2004. 

- - - - - - - - - - - - - -

-- Quick example 1:
Use Case "2.9 Finding Input and Output Documents for Test Cases" is

[Checked for syntactic correctness]

SELECT in, out
FROM  {X} <test:inputDocument>  {in} ;
          <test:outputDocument> {out} ;
          <test:status>         {"APPROVED"}
USING NAMESPACE
  test = <!http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#>


Legend:
  {...} are graph nodes, edges are unquoted.
  Variables are bare words, so a variable at a node is {X}
  <> are qnames so a qname in a node slot is {<...>}
  <!...> are URIs
  "" are literals; ^^ is the RDF type notation.


-- Quick example 2:

CONSTRUCT 
   {Painting} <my:createdBy> {Painter}
FROM
   {Painter} <rdf:type> {<cult:Painter>}; 
             <cult:creates> {Painting}
USING NAMESPACE
    cult = <!http://www.icom.com/schema.rdf#>,
    my = <!http://www.foo.com/bar#>

- - - - - - - - - - - - - -

3.1 RDF Graph Pattern Matching

Yes. The pattern language is triples, with named variables.  There is
syntactic support for paths and for property and object lists (c.f. N3).

{} are unnamed node variables and are permitted where there is an
unconstrained path element.  They must cause a match.  Paths are
resource-property-resource-property-resource-...

The query pattern is a conjunction of all path and triple elements.


3.2 Variable Binding Results
Yes, via SELECT and SELECT DISTINCT queries


3.3 Extensible Value Testing
No - fixed set of comparison operators.


3.4 Subgraph Results
Yes; not directly, but supports CONSTRUCT queries which is RDF templating.
A second pattern is supplied and the result of a query is the merge of the
all the results with variable values substituted into the template.  This
would be the subgraph if the CONSTRUCT pattern were the query pattern.  The
form "CONSTRUCT * is a shorthand for this.

The protocol requires SELECT and CONSTRUCT queries to go to different end
points.


3.5 Local Queries
Yes.  Source is not named in the query.  The Sesame system supports remote
and local databases as well as in-memory repositories.


3.6 Optional Match
Yes.  Provides optional triple matches.  The semantics is to execute the
mandatory part of the query and then attempt to fill the optional part.


3.7 Limited Datatype Support
Yes. SeRQL supports the operators '<', '<=', '>' and '>=' for numerical
values (i.e. literals with a known xsd numerical datatype).  


3.8 Bookmarkable Queries
Yes.  Query target graph is named as a parameter to the query request.


3.9 Bandwidth-efficient Protocol
Yes.  For SELECT queries, custom XML format for results, or RDF encoding of
same [4].  CONSTRUCT queries return an RDF graph in a selected
serialization.  Current implementation does not support compression of HTTP
result body.  This is part of the protocol, not the query language.


3.10 Result Limits
No.


4.1 Human-friendly Syntax
Yes (*). SQL-like syntax.

[* your definition of "friendly" may differ.]

4.2 Provenance
No.


4.4 User-specifiable Serialization
Requests specify the RDFencoding.  Not MIME-type negotiation.  Part of the
protocol, not the query language.


4.5 Aggregate Query
No.


4.6 Additional Semantic Information

Sesame provides RDFS-level inference. Can use serql:directSubClassOf to get
direct subclass relations, turning off transitivity for the rdfs:subClassOf
property.  Similar serql:directSubPropertyOf.


[1] Sesame:   http://www.openrdf.org/ 
[2] SeRQL:    http://www.openrdf.org/doc/users/ch05.html 
[3] Protocol: http://www.openrdf.org/doc/users/ch07.html 
[4] Result set in RDF
    http://www.w3.org/2003/03/rdfqr-tests/recording-query-results.html

Received on Wednesday, 2 June 2004 10:14:12 UTC