Re: unsaid/not: any champions?

OK, some more comments from a couple of our engineers.

--- Comment 1 ---

I think exclude/unsaid by itself is limited.  If it's combined with 
subqueries then exclude/unsaid becomes more powerful or you define 
another join operation like Paul has done.

The documentation for exclude is here:
http://www.kowari.org/187.htm#o2768

This described how it interacts with normal constraints, tucana:is and 
subqueries.

We also recently added the ability to do the following:
select
...
where exclude(<urn:some:foo> <urn:some:bar> <urn:some:baz>);

This will return true (unconstrained) if the statement does not exist 
in the graph and false (empty) if the statements does exist.

An example of this in action is the iTQL query I wrote that is supposed 
to check for allValuesFrom OWL constraint (it's not quite complete but 
you get the idea):

select $s $p $x subquery (
   select $instance $t $x subquery (
     select
     from <...#testexclude>
     where exclude($instance $t $x))
   from <...#testexclude>
   where $s $p $instance and $t <tucana:#is> <rdf:type>
   and exclude($instance $t $x))
from <...#testexclude>
where $r <rdf:type> <owl:Restriction>
and $r <owl:onProperty> $p
and $r <owl:allValuesFrom> $x
and $s $p $o2
order by $s ;

http://morenews.blogspot.com/2004/09/not-is-no-more.html


--- Comment 2 ---

I haven't looked at this issue much, so maybe I'm getting it wrong, but 
it seems that a cardinality test is all that is needed for this 
feature.  iTQL does this with <tucana:occurs>.  So test if a statement 
is "unsaid" you count the number of statements, and use a where clause 
to find where it occurs 0 times.  To test if there are one or more 
statements you test for "<tucana:occursMoreThan> '0'"


--- END OF COMMENTS ---




On 07/10/2004, at 6:46 AM, Seaborne, Andy wrote:

>
> Tom - Thanks for that information.
>
>> http://www.kowari.org/187.htm#o2768
>
> I noted it says:
>
> """
> The variable names used in the exclude function are not bound by other
> constraints
> """
>
> 	Andy
>
> -------- Original Message --------
>> From: Tom Adams <>
>> Date: 7 October 2004 02:21
>>
>>> <snip/>
>>> Simon/Tom - does Kowari prvide any similar feature?  I have had
>>> requests for it in the past but it is not a common request (I guess
> I
>>> have had less than 5 such requests).
>>
>> Sure does, the new exclude feature in 1.0.5:
>>
>> http://www.kowari.org/187.htm#o2768
>>
>> Simon may be able to speak more about it, as can Paul in his blog
> here:
>>
>> http://gearon.blogspot.com/2004/09/documentation-majority-of-today-
>> was.html
>>
>> I've also asked for comments from the guys who implemented it.
>>
>>> <snip/>
>>
>> Cheers,
>> Tom
>> --
>> Tom Adams                  | Tucana Technologies, Inc.
>> Support Engineer           |   Office: +1 703 871 5312
>> tom@tucanatech.com         |     Cell: +1 571 594 0847
>> http://www.tucanatech.com  |      Fax: +1 877 290 6687
>> ------------------------------------------------------
>
>
-- 
Tom Adams                  | Tucana Technologies, Inc.
Support Engineer           |   Office: +1 703 871 5312
tom@tucanatech.com         |     Cell: +1 571 594 0847
http://www.tucanatech.com  |      Fax: +1 877 290 6687
------------------------------------------------------

Received on Thursday, 7 October 2004 16:45:00 UTC