Re: querying higher logic with graph query

On January 26, Martin Duerst writes:

[...]

> > > 'return all the parents of John' I guess would typically be formulated
> > > as 'return all the triples where X is either an object or a subject,
> > > and X is a parent of John'. In that case, bnodes should do the job.
> > > If there is an infinite number of answers, and all of them are
> > > inherently interesting, then I don't see the problem of asking for
> > > them. Implementations should be able to deal with such things
> > > (in the sense at least that they use some implementation-defined
> > > limits to avoid what becomes a denial-of-service issue). This
> > > is not much different from many other technologies: Web pages
> > > can be of 'infinite' length (easy to do with a cgi script),
> > > programs can go into infinite loops, big databases can give back
> > > virtually 'infinite' results, and so on. Of course, if the question
> > > 'how many' in an important use case, then we might get to
> > > something that can answer 'an infinite number'. As you say,
> > > some systems may be able to deduce that (in finite time),
> > > and some users may be interested in such an answer.
> >
> >The size of the answer isn't the only issue - there is alos the
> >question of whether it makes sense to return multiple (never mind
> >infinite) bnodes in an answer given that the semantics of bnodes means
> >that every such answer is in some sense the same.
> 
> If it's just the bnodes themselves that are returned, then that
> doesn't look like it makes much sense. But my guess is that in
> many cases, this would just be the result of a badly thought-through
> query, or lack of relevant data, rather than a problem in the overall
> system. But maybe you can think of cases where that's not the
> case.

Examples seem easy to find. How about retrieving the parents of
"Fred". We may know from the ontology that there are exactly two of
them, but have no information about their identity. We may also want
to retrieve the ancestors of Fred - the ontology may dictate that
there are many (perhaps infinitely many) of them.

> 
> On the other hand, returning bnodes with properties and values attached
> to them makes a lot of sense and may in many cases be exactly what
> is expected. Also, having the same bnode show up twice may be
> important, because it shows how the data is connected.
> 
> In addition, bnodes are often used in certain modeling techniques,
> e.g. to simulate the lack of properties on literals.

This seems to assume that RDF is being used directly for modelling. In
languages like OWL, bnodes (indeed the whole RDF graph) may simply be
an artifact of the encoding in RDF syntax.


> >Moreover, (possibly infinite) anonymous answers is only one example of
> >the general problem. Another example is the case where the system can
> >deduce that the answer to a query is either "Peter" or "John", but has
> >no way to determine which one. The point is that simply returning
> >instantiated graphs may be too weak to capture query responses for
> >more expressive languages.
> 
> Again, very good material for a use case document.
> 
> I'm purely guessing here, but my answer would be as follows:
> If this 'more expressive language' is expressed in RDF, then
> it should be possible to again express the result in an RDF
> graph. If you are able, in this language, to express the
> 'fact' that some property is either "Peter" or "John", then
> you should also be able to express that the result of a query
> is either "Peter" or "John". The alternative construct in
> RDF already does this, or may come close.

This may be the case, but then other problems arise, including the
semantics of answers, and how to distinguishing "literal" answers
(data) from answers that are to be interpreted as a syntax encoding of
a more expressive language - a perennial problem in RDF/OWL where the
syntax of the language itself and the thing being expressed in the
language are not distinguished.

Ian

> 
> It may be that there are languages where certain things can
> be deduced, but not expressed; if this is the case, it would
> be good to get examples.
> 
> 
> Regards,  Martin.
> 

Received on Tuesday, 27 January 2004 15:33:04 UTC