W3C home > Mailing lists > Public > www-rdf-rules@w3.org > September 2001

Re: What is an RDF Query?

From: David Allsopp <d.allsopp@signal.qinetiq.com>
Date: Fri, 14 Sep 2001 08:48:26 +0100
Message-ID: <3BA1B64A.77E7E662@signal.qinetiq.com>
CC: www-rdf-rules@w3.org

Eric Prud'hommeaux wrote:

> Be they in the original dataset or in temporary database from which
> the query response is culled, the consequence of a rule must be noted
> in order to be useful. I called that operation "inserting", perhaps
> wrongly (or incoherently). By the terms I used,
>   if P then Q
> can be described as a rule made of a query P and an assertion Q.

> > No, nobody's saying one should match a _rule_ against a _query_, I
> > think.
> >
> > As Pat says, the antecedent of a rule matches assertions. I think some
> > people regard the antecedent as a query over the fact base ("Is this
> > assertion in the fact base? If so, assert the consequent").
> I meant the query and assertion to be tied together. I state a rule in
> terms of a query and set of assertions.

Yes; I think we are vigorously agreeing 8-)

> > In implementation terms, the antecedent may literally involve a query,
> > because to match it against an assertion one has to extract assertions
> > from a fact base (i.e. query a database looking for matching
> > assertions). One might then speak of "matching the query" i.e.
> > succeeding in matching the rule's antecedent with an assertion.  I think
> > this is common (though clearly confusing) usage...
> I think the reason it is/could be useful is that the query part of
> rules can be expressed in the same language as the query part of
> queries (which would be the greater part).

Yes, good point.

> > Perhaps the confusion lies in "query" as an expression (where some
> > syntax, such as a question mark, indicates a question), and "query" as a
> > implicit process, where assertions are compared.
> Is there a difference beyond the expectation of what to do with the
> results?

Not really, but it seems to be leading to confusion...

Some people seem to express a rule as [query->assertion], where the
antecedent is _explicitly_ a query (i.e. uses different syntax to an
assertion). Others seem to use [assertion->assertion] where the
antecedent is only implicitly a query; it is understood in the
implementation that one checks whether the antecedent assertion is true
in the fact base. That's all.

Hence, some people would speak of "matching a query" where others would
say "matching an assertion" or "matching the antecedent" for exactly the
same process.


David Allsopp

/d{def}def/u{dup}d[0 -185 u 0 300 u]concat/q 5e-3 d/m{mul}d/z{A u m B u
m}d/r{rlineto}d/X -2 q 1{d/Y -2 q 2{d/A 0 d/B 0 d 64 -1 1{/f exch d/B
A/A z sub X add d B 2 m m Y add d z add 4 gt{exit}if/f 64 d}for f 64 div
setgray X Y moveto 0 q neg u 0 0 q u 0 r r r r fill/Y}for/X}for showpage
Received on Friday, 14 September 2001 03:49:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 2 March 2016 11:10:13 UTC