From: Rob V. <rv...@vd...> - 2010-06-17 16:13:27
|
Hi Michael So I'm not entirely sure what the issue is from your description though I have a possible idea. Firstly I need to know what your SPARQL queries look like as without seeing those I can only guess at the issue so if you could send those that would be very helpful. Also if possible can you send some data that will reproduce the issue - a subset of your data which shows the issue would be sufficient. Secondly I note that you state "entities/nodes" in your report which leads me to believe that some of the things are blank nodes - is this correct? If they are then you may not be getting the behaviour you expect from SPARQL for several reasons: 1) Blank Nodes in a SPARQL query act as anonymous variables rather than node matches. For example the query SELECT * WHERE { _:bnode ?p ?o } would not get all the predicates and objects associated with a specific Blank Node as you might be expecting but rather gets the predicates and objects of every single triple in the store since _:bnode is an anonymous variable. 2) Blank Nodes are scoped to a specific Graph so if you've added the data as several separate graphs then the Blank Node _:bnode in one is not the same as _:bnode in another though they'll have the same Node ID in the database hence why a SQL query would join them while a SPARQL query would not. 3) Blank Nodes labels in the output get automatically rewritten in a number of instances by the SPARQL engine to attempt to uniquely distinguish them since identical labels may have been used across different graphs in the store and as per point 2 these are not the same node Of course none of the above may be the actual cause of your issue but without seeing any data or SPARQL queries I can only speculate. Regards, Rob Vesse ---------------------------------------- From: Michael Friis <fr...@gm...> Sent: 17 June 2010 15:41 To: dot...@li..., rv...@vd... Subject: Triples evident in database not visible via Sparql query (this report hasn't been boiled down completely, apologize) I have a large graph where I initially assert a lot of triples. These triples are then visible just fine through Sparql queries. I then assert some more triples which are not really related to the old ones (although they concern the same entities/nodes). This causes some of the original triples to disappear from sparql queries. The specific triples that are not visible, are those where one of my entities (UriNodes) are subjects instead of being objects. I can find the relevant nodes and triples fine in the database (I use MS SQL Server), they just don't show up when I run Sparql queries. What's going on? Here's an example SQL query that shows me the relevant nodes and triples are in place: select n2.*, n.* from TRIPLES t inner join NODES n on t.tripleObject = n.nodeID inner join NODES n2 on t.tripleSubject = n2.nodeID where t.tripleSubject = 27 select n2.*, n.* from TRIPLES t inner join NODES n on t.tripleSubject = n.nodeID inner join NODES n2 on t.tripleObject = n2.nodeID where t.tripleObject = 27 Regards Michael |
From: Rob V. <rv...@do...> - 2010-06-21 07:28:50
|
Sorry for the slow reply, I've was away over the weekend. Ok so it's not an issue of Blank Nodes and it doesn't appear to be an issue with the query. My next suggestion would be that it might be due to the way your SPARQL endpoint is configured. Are you creating a SPARQL endpoint in an ASP.Net application and then querying against it? If so then you may need to check the configuration of your endpoint. By default the endpoint is configured with the LoadMode setting set to OnDemand which means that it only starts with the default graph loaded in memory and only loads other graphs from the SQL store as and when queries demand them. If it is not already set to something else I would recommend setting the LoadMode setting to be PreloadAll which ensures that all the data is loaded from the store before it answers any queries. Another possible explanation for your missing triples is that if you've set this to PreloadAllAsync then the endpoint will start answering queries before it has fully loaded the data which means that until the data finishes loading the data your queries will return incomplete results. If this is not the cause of your issue then is it possible for you to send me some sample data so that I can do some tests and debugging to determine what the cause of the problem might be. Thanks, Rob Vesse ---------------------------------------- From: "Michael Friis" <fr...@gm...> Sent: Thursday, June 17, 2010 10:02 PM To: rv...@vd... Subject: Re: [dotNetRDF-develop] Triples evident in database not visible via Sparql query > Of course none of the above may be the actual cause of your issue but > without seeing any data or SPARQL queries I can only speculate. Here's a SPARQL query which returns no results (I've checked the prefixes): select distinct ?obj where { ?obj eb-owl:isaliasof ?subj } If I do whis to the database: select * from NODES n where n.nodeValue like '%isalias%' ... I can see that the eb-owl:isaliasof node has nodeId 4047 If I then do: select * from TRIPLES t where t.triplePredicate = 4047 ... I get over a thousand rows. Note that this seems to work after initial data load, but it then borks as I add more tripples... Michael -- http://friism.com (+45) 27122799 Sapere aude ---------------------------------------------------------------------------- -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Dotnetrdf-develop mailing list Dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop |
From: Michael F. <fr...@gm...> - 2010-06-17 21:01:27
|
> Of course none of the above may be the actual cause of your issue but > without seeing any data or SPARQL queries I can only speculate. Here's a SPARQL query which returns no results (I've checked the prefixes): select distinct ?obj where { ?obj eb-owl:isaliasof ?subj } If I do whis to the database: select * from NODES n where n.nodeValue like '%isalias%' ... I can see that the eb-owl:isaliasof node has nodeId 4047 If I then do: select * from TRIPLES t where t.triplePredicate = 4047 ... I get over a thousand rows. Note that this seems to work after initial data load, but it then borks as I add more tripples... Michael -- http://friism.com (+45) 27122799 Sapere aude |