RE: why query languages and RDF data have syntaxes?

I think the query languages you have looked at are trying to address the
problem of getting information out of an RDF model.  They appeal to the
common SQL paradigm and provide a programming structure that application
writers are familiar with.  In particular, the result of a query is a set of
variable bindings, not a gragh (or set of graphs).  Having such a syntax for
a query is convenient - building queries as an RDF model in a toolkit of
your choice is a bit tedious.

That said, they do have graph patterns in these languages: e.g.

SELECT *
WHERE (?x, <ns:property1>, ?z) , (?z, <ns:property2>, ?x)

has a graph pattern in the WHERE clause vaguely emulating N-Triples.

As Dan notes, you can (and people have) use additional decoration of a graph
to encode the variable name.  You need named variables to (1) get the
answers out [modulo paradigm] and (2) to encode some graph patterns (shared
structures).

Where the more explicit graph pattern is interesting is in processing RDF
into RDF - turning one graph into another.  There is also N3 which has named
universal variables in the syntax of the language making it clean in writing
patterns in formulae, differentiating the query variables from the bNodes.

	Andy

-----Original Message-----
From: JeffZhang [mailto:jeffzhang726@yahoo.com.cn] 
Sent: 29 November 2002 20:22
To: www-rdf-interest@w3.org
Subject: why query languages and RDF data have syntaxes?



Dear all,
    I can not understand why syntaxes of several current rdf query languages
are so much different
with the syntax of RDF data. In my opinion, a query is match a pattern(a
subgraph with 
undetermined values) against the universal(the big graph in knowledge base).
Why not use 
just a small rdf data set with blank nodes to represent the subgraph? 
I think these query languages have more close relation with sql than with
rdf model.
	


Best regards,
 				

JeffZhang
jeffzhang726@yahoo.com.cn
2002-11-29


_________________________________________________________
Do You Yahoo!? 
"是IT精英吗?小试牛刀获时尚大奖!"
http://cn.promo.yahoo.com/cgi-bin/udb/u

Received on Friday, 29 November 2002 04:30:35 UTC