Hi,
I'm trying to do some queries, to gather all data "around" some
resource.
Basically, questions like "Get me all triples pointing in and out of
this resource, and all triples connected to THOSE resources."

So I put together a query like:
CONSTRUCT {
?obj ?outPred ?outObj .
?inObj ?inPred ?obj .
} WHERE  {
?x vocab:ObjTitles_Title ?objTitle .
FILTER fn:matches(?objTitle, 'madame x' ,'i') .
?x vocab:ObjTitles_ObjectID ?obj .
?obj ?outPred ?outObj .
?inObj ?inPred ?obj .
}

That query works fine.
However, Now I want to do two additional things:
1. go an additional hop out, in either direction (ie, get all triples
connected to the ?outObj and ?inObj resources)
2. Get all triples connected to the PREDICATES themselves. (this would
usually be ontological information, like domain, subproperty, etc)

Attempting to add either 1 or 2, leads to queries that don't seem to
ever complete.
Here's the query I have now:

CONSTRUCT {
?obj ?outPred ?outObj .
?inObj ?inPred ?obj .
?inPred ?y ?inPredProps .
?outPred ?x ?outPredProps .
?outObj ?outOutPred ?outOutObj .
?inObj ?inOutPred ?inOutObj .
} WHERE  {
?x vocab:ObjTitles_Title ?objTitle .
FILTER fn:matches(?objTitle, 'madame x' ,'i') .
?x vocab:ObjTitles_ObjectID ?obj .
?obj ?outPred ?outObj .
?inObj ?inPred ?obj .
OPTIONAL {?outPred ?x ?outPredProps}.
OPTIONAL {?inPred ?y ?inPredProps } .
OPTIONAL { ?outObj ?outOutPred ?outOutObj } .
OPTIONAL { ?inObj ?inOutPred ?inOutObj . }
}

I'm wondering if my querying is creating loops somehow, and that's why
trying to go extra hops on the graph is making the query fail to
complete?
Or is it just that there's too much data to sift through?

Also, I seem to notice a big reduction in performance whenever I try
to use a predicate as the subject in a query. Is there a difference
internally (Sesame/Mulgara) in how predicates are indexed, that would
be the cause of it?


perhaps there's a better approach to this problem, which is that I
want to extract a connected graph, centered around some node or group
of nodes.


thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to