0

Slide 14 of Ontology Alignment Discovery using Linked Open Data says that there are 50,603 actors in the LinkedMDB dataset. Using the following query, I get 2500. Who is wrong here?, Is there something missing in the query? Why do the slides count such a high number? This is the SPARQL query:

select(count(distinct ?actors) as ?nActors) where {
  ?actors a <http://data.linkedmdb.org/resource/movie/actor> .
}

Results

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Suvimo
  • 240
  • 1
  • 6
  • 18

1 Answers1

1

Many public endpoints impose limits on queries in order to ensure that one badly behaved client does not bring down/adversely affect performance for other users of the service.

The specific service you are talking about appears to have a result limit of 2500 as answers like this discuss

Some services may also have execution time limits that prevent queries running beyond a certain amount of time.

You can normally work around this limitation by using the LIMIT and OFFSET to request pages of results. Unfortunately it appears that this won't help your query because you use an aggregate and it appears the service is applying the limit prior to the aggregation. Note that if you have other queries where the LIMIT and OFFSET approach would work i.e. those that don't use aggregation you may also need to add an ORDER BY as depending on the SPARQL service without it you may just receive the same results repeatedly

Community
  • 1
  • 1
RobV
  • 28,022
  • 11
  • 77
  • 119
  • Thanks, but do you have any idea why in that slide they are giving that big number? are their numbers incorrect? – Suvimo Jun 18 '14 at 12:26
  • No, it is likely that they either had direct access to the data or that the SPARQL endpoint did not have the restrictions it has now 3 years ago – RobV Jun 18 '14 at 13:04
  • I see.. Because actually when I go to this directoy: http://data.linkedmdb.org/directory/actor and look for Brad Pitt for example, I cant see any entry with that name, but this link http://data.linkedmdb.org/page/actor/29783 shows that there is an actual Brad Pitt under the ontology of Actor! So you think that there is no way for me at all to get to see all the results? since you said that LinkedMDB limited the number of entries I can fetch from the directory? – Suvimo Jun 19 '14 at 10:02