W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2002

RE: why query languages and RDF data have syntaxes?

From: Seaborne, Andy <Andy_Seaborne@hplb.hpl.hp.com>
Date: Fri, 29 Nov 2002 09:30:21 -0000
Message-ID: <5E13A1874524D411A876006008CD059F0586CAFB@0-mail-1.hpl.hp.com>
To: "'jeffzhang726@yahoo.com.cn'" <jeffzhang726@yahoo.com.cn>, "'www-rdf-interest@w3.org'" <www-rdf-interest@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:57 GMT