Re: Semantic Web Phase 2 Activity - Protocol - Query Language

On 2003-11-11 18:04, "ext Leo Sauermann" <leo@gnowsis.com> wrote:

> 
> 
> Hi,
> 
>>>> - OUTER JOIN Queries, (optional matches)
>> Saying that a common language should include OUTER JOIN is
>> irrelevant IMHO.
> 
> perhaps I did not write correctly what I mean,
> 
> because from your answer I think you understood that i wanted to have
> some SQL standard stuff written in the Rdf-Query standard. Like "to
> implement a RDF-Query, you have to use these internal SQL queries"
> thats not what I meant, the OUTER JOIN problem is a RDF problem you have
> when you try to use RDQL (a very popular query language, imho).
> 
> 
> If you query
> (?x foaf:firstname ?y) (?x foaf:image ?z)
> 
> I want to retrieve something like:
> x: http://gnowsis.com/leo
> y: "Leo"
> z: http://gnowsis.com/pictures/leo.jpg
> 
> or
> 
> x: http://gnowsis.com/leo
> y: "Leo"
> z: null
> 
> but with today's RDQL this is more complicated:
> if there is no <foaf:image> triple for leo, you don't get any data at
> all.
> :-0
> AND THAT IS A PROBLEM, if you have ever programmed RDQL, thats the first
> thing you curse.
> because you can't retrieve a set of properties, you have to formulate
> queries for every single property, its just lame.

In RDFQ, one can consider all unspecified properties as implicitly
optional, because the results of a match are the complete concise
bounded descriptions of the target resources. Thus, the simple query

[:target [foaf:firstname []]

matches all resources which have a foaf:firstname defined, the results
being a graph containing the concise bound descriptions of all such
resources, and if they happen to have a foaf:image also defined, it will
be in the description returned.

With RDFQ, one simply indicates which properties are manditory, and
one gets everything else "for free".

One may then use one's API of choice to manipulate the result graph
to one's heart's content (as RDFQ is about knowledge discovery, not
knowledge manipulation).


> see
> http://www.google.com/search?q=rdql+outer+join&sourceid=opera&num=0&ie=u
> tf-8&oe=utf-8
> 
> So the good ol "SQL OUTER JOIN" problem shows up in RDF again....

Well, in certain query languages, at least, but it's not a problem
inherent in either RDF or the querying of RDF graphs, per se.

Cheers,

Patrick




>> may be missing and come up with a document that specifies
>> what the darn 
>> language should be able to do against a store, where a store
>> is nothing 
>> but a graph or set of graphs.
> 
> agreed. thats what a rdf query language is.
> Querying RDF (in some result format) from a graph or model or whatever
> speaks RDF.
> 
> 
> 
> greetings
> Leo
> 
> 

Received on Wednesday, 12 November 2003 03:17:55 UTC