You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Benson Margulies <bi...@gmail.com> on 2010/12/29 14:08:26 UTC

Inferring in tdb

Andy, I'm not ignoring your suggesting to make better data, just
deferring it so that I can get something working at all for some other
people.

I looked back through my archive of messages about adding inference on
top of tdb, and I realize that I never seem to have quite captured
some critical facts. You just wrote: 'is limited to in-memory use'.

In some of my much earlier email, I was floundering about wanting to
set up a structure where an in-memory model sits on top of TDB, and
(slowly) performs inference by pecking at the TDB.

I didn't turn that on: instead, my current approach is to use a query
to grab roughly defined slice of the contents of the TDB, and then
poke at it in memory to work out the details. To pull several threads
into one place, my goal is to collect:

* All subjects that match     ?s hasSomeLiteral "FOO"
- All statements about these subjects

Then, for each of these s-es,

* All subjects that match ?s owl:sameAs ?t   (only one sameAs
required, only one direction. Due to how the sameAs's are added, at
this point there are never any multi-step paths and it all goes one
way.)
- All statements about these subject

For all the ?s's and ?t's (call the combination ?q for purposes of explanation)

* ?q ?pred ?r
?pred rdfs:subClassOf* rex:relationship

(I never actually use rex:relationship itself, so I don't need the first step)

* and then a single step of sameAs from the ?r's.

Perhaps the fundamental question here is whether I'm making my life
pointlessly complex by trying to construct a single query for all of
this, instead of writing the query for each step in the process, and
just iterating the results running more queries to get the next piece.