Other QBE systems typically work with databases where there is no expectation of capability to query over schema. So, if someone selects class A, it is clear that the query will be about members of this class not about the class itself. In RDF and SPARQL, on the other hand, queries commonly combine schema level information with data level information. This presents an extra added challenge in figuring out how to best specify queries visually.
What you can do in TBE (Ensemble) is place on the canvas classes A, B and C, then pick any one instance of each class, generalize the instances and use "add link" to specify the connections between them. Regards, Irene Polikoff -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of BXJ Sent: Wednesday, April 13, 2011 7:05 AM To: TopBraid Suite Users Subject: [topbraid-users] Re: Using Graph View in TBC to show the queries Hi Scott, There might be a problem if say a new instance c4 was chosen as the starting point in which there were no triples with either a1 or b1. How would you approach this problem? In a large set of instances it would not be possible to find a suitable starting point. This is a little different from QBE in other applications where there is no need for a starting point. Barry On Apr 13, 2:38 pm, Scott Henninger <[email protected]> wrote: > Hello, Carol; The way to look at the "Generate SPARQL from Current > Graph" feature in Composer is as a query-by-example tool. Build an > example graph and each node will be turned into a variable. > > I your case, add a member of C in the graph and choose has_A as the > property. Let's say you choose c1. Expand has_A and you will get {c1 > has_A a1 ; has_A a2}. Remove one of these so there is just one > triple. Then choose c1 again and the has_B, expanding to {c1 has_B > b1} (note this triple was repeated in the example given). > > At that point you should have a graph with two triples {c1 has_A a1 . > c1 has_B b1}. Click on the "Generate SPARQL..." star and the query > will appear in the SPARQL view. > > There is an alternative in Ensemble that works differently, and could > also be useful. In that case. assuming you have TBC-ME running, go tohttp://localhost:8083/tbl, open your model in the Default Application > and go to the Graph Editor and Query tab. Choose Add Node and click > in the workspace. Use autocomplete to choose a c1, c2, or c3. Click > on the node and panels will appear to the left and right to show > "incoming" and "outgoing" properties. You can build your graph this > way, and has the advantage that you can choose one or many properties > to build on. Then when the graph is right, choose each node you want > to turn into a variable and choose the "Generalize" button on the > bottom. When finished, choose Submit Query on the top. The results > will appear in the Results Grid and the query will appear in the > SPARQL Editor. > > It's difficult to describe visual tools verbally, so if you get hung > up anywhere, let us know. > > -- Scott > > On Apr 12, 8:53 pm, Carol <[email protected]> wrote: > > > If I have an class C with say instances c1, c2 and c3 > > > I have two more classes A, and B with instances a1, a2 and b1, b2 > > and b3 respectively. > > > I have two object properties linking the C class (domain) with A > > (Range) and B (Range): has_A, has_B. > > > The following triples are set in my graph: > > > c1 has_A a1 > > > c1 has_A a2 > > > c1 has_B b1 > > > c1 has_B b1 > > > c2 has_A a1 > > > c2 has_B b1 > > > c3 has_B b1 > > > c3 has_B b3 > > > I can create a SPARQL query that will list all members of class C > > who have links with both a1 and b1 using has_A and has_B respectively, > > which results in identifying c1 and c2. > > > The question is how can I use the Graph Editor in TBC to give me > > the same answers ? -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. 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-users?hl=en -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. 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-users?hl=en
