Re: Tools for 20 million triples?

> Hi Andrew,
> Is it possible to do optional query clauses in Kowari?
> E.g. match a resource by a set of criteria, and also return the
> rdfs:label of the resource if it exists.
> (it wasn't obvious to me from the documentation)

Yes, you use subqueries:

As that vcard example shows Superman doesn't have a title, Spiderman has
two and Corky Crystal has one.
This is one of the most frequent questions we get.  I find the subqueries
syntax kind of ugly.  I'd prefer a MAYBE operator (as mentioned in Date's
"Introduction to Database Systems") and an alternative way to render the
results.  So the vcard query becomes something like:
select $vcard $fn $title
from <rmi://>
where $vcard <> $fn and
maybe $vcard <> $title
order by $fn $title;

I think this would work especially well when you had multiple values that
may or may not exist.
An alternative way of rendering might include saying, before querying, if
the value is not found the result is an empty string, 0, "none" or some
other predefined value.  That way it would come out in a tabular format
that most people seem to expect.
If you or anyone else has any other ideas it'd be good to hear about.

Received on Friday, 26 March 2004 21:58:12 UTC