W3C home > Mailing lists > Public > www-rdf-interest@w3.org > March 2004

Re: Tools for 20 million triples?

From: Andrew Newman <anewman@pisoftware.com>
Date: Sat, 27 Mar 2004 12:58:00 +1000 (EST)
Message-ID: <52305.218.214.122.236.1080356280.squirrel@kernigan.pisoftware.com>
To: <pdawes@users.sourceforge.net>
Cc: <www-rdf-interest@w3.org>

>
> 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:
http://kowari.sourceforge.net/docs/user/itql.php#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://site.domain.net#vcard>
where $vcard <http://www.w3.org/2001/vcard-rdf/3.0#FN> $fn and
maybe $vcard <http://www.w3.org/2001/vcard-rdf/3.0#TITLE> $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

This archive was generated by hypermail 2.3.1 : Tuesday, 18 February 2014 13:20:07 UTC