hello if we have this data
after inference by construct three triples add to graph
the sparql select return return 6 rows for Apple_iPhone_5 that is because property inCategory have 2 value Property fromarea have 3 value 2*3 = 6
this is the query
how can i prevent this redundancy in data
asked 19 Feb '13, 16:13
You can 'prevent' this 'redundancy' in several ways.
One way is to just adapt your SELECT clause: only select those variables where there are no double values expected for a given subject, and then do separate queries for the other values:
Another way to reduce the number of result rows is to use a
Yet another way is to use subqueries to only retrieve one value for each given item:
There probably other varieties of the above suggestions you can use (I can imagine you could combine the
You can also choose to use a CONSTRUCT query instead of a SELECT, so that your result will be in the form of a subgraph which you can then pick apart.
By far the simplest way to deal with it, however, is to just accept that when something has multiple values for a certain property, you will get partially-duplicate solutions in your query result, and just to keep that in mind when processing your result.
answered 19 Feb '13, 18:26
Jeen Broekstra ♦