Re: trivial question about SPARQL

editor@content-wire.com wrote:
> 
>  
> Is this the current working doc?
> http://www.w3.org/TR/2004/WD-rdf-sparql-query-20041012/
>  
> What's the status of: SquishQL, RDQL, and TriQL ? still in use?

I can't speak to the others but I'm recommending that developers do not use 
RDQL any more - SPARQL provides everything RDQL does, and more, and in a more 
formal setting.  Jena/ARQ provides RDQL for compatibility only.

> Aare the main operators still the following, or has the syntax changed:

SPARQL is described by:
http://www.w3.org/TR/rdf-sparql-query/

>  
> 
>             PREFIX — specification of a name for a URI (like RDQL’s USING).
> 
> *           SELECT — returns all or some of the variables bound in the 
> WHERE clause.
> 
> *           CONSTRUCT — returns a RDF graph with all or some of the 
> variable bindings.
> 
> *           DESCRIBE — returns a description of the resources found.
> 
> *           ASK — returns whether a query pattern matches or not.
> 
> *           WHERE — list, i.e. conjunction, of query (triple or graph) 
> patterns.
> 
> *           OPTIONAL — list, i.e. conjunction, of optional (triple or 
> graph) patterns.

There's UNION as well which returns the matches from both sides (multi-set 
disjunction).

> 
> *           AND — boolean expression (the filter to be applied to the 
> result). [1] <mhtml:mid://00006963/#_ftn1>

There is no AND keyword in SPARQL.  Filters look like:

FILTER(expression)

and can be mixed in the rest of the graph pattern.


e.g.

PREFIX  dc:  <http://purl.org/dc/elements/1.1/>
SELECT  ?title
WHERE   { ?x dc:title ?title
           FILTER regex(?title, "^SPARQL")
         }


	Andy

>  
> thanks
> PDM
>  

-- 
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

Received on Friday, 25 January 2008 10:07:59 UTC