[topicmapmail] external resources reifying
Jan Algermissen
algermissen@acm.org
Thu, 19 Feb 2004 22:28:14 +0100
Lars Marius Garshol wrote:
>
> * Lars Marius Garshol
> |
> | select $TOPIC from
> | occurrence($TOPIC, $OCC), resource($OCC, "http://foo/document1.pdf")?
>
> * Jan Algermissen
> |
> | could you explain to me in prose what this query does?
>
> The first predicate would essentially build a table with two columns
> and one row for every occurrence in the topic map. The second
> predicate would take that table and remove all rows where the
> occurrence does not have "http://foo/document1.pdf" as the resource.
Ok, thanks. My intention is to show that the query uses information that
is not part of the model. For example: if there was "select from all
resources..." in some query it would imply an index that allowed you to
access all resources directly and since the TMDM does not have that
notion one could say that the query language was not based on
the model.
[...looking at the data model now...]
Hmm...while I first thought that I was wrong at least for this query, I
found no mechanism in the model to directly acccess all occurrences
(topic map item does not have an 'occurrences' property) and the question
is how you express "build a table with two columns and one row for every
occurrence in the topic map" in terms of the data model. The only way to
do this seems to be "look at all topic elements, if the topic element has
occurrences select the topic and the occurrence". This can be
pretty inefficient if you have lots of topics but only one has an occurrence.
I might not be able to make my point clear enough, but maybe you get the
basic idea.
The bottom line is that an inherent part of the query language (in this case
the occurrence predicate) should reflect information that is directly available.
Anyway, once I can express myself more clearly I'll surely come back on this.
>
> (Note that this is what happens conceptually. In the OKS this would be
> executed differently, but this is the conceptual interpretation of the
> query.)
Of course, yes.
Jan
>
> --
> Lars Marius Garshol, Ontopian <URL: http://www.ontopia.net >
> GSM: +47 98 21 55 50 <URL: http://www.garshol.priv.no >
>
> _______________________________________________
> topicmapmail mailing list
> topicmapmail@infoloom.com
> http://www.infoloom.com/mailman/listinfo/topicmapmail
--
Jan Algermissen http://www.topicmapping.com
Consultant & Programmer http://www.gooseworks.org