0

I'm using ARC2 in order to execute SPARQL queries on DBpedia and get the results as a HTML Web page (a table). Thus the script for this purpose is written in PHP and SPARQL.

But I would also like to integrate "in the same time" another endpoint in order to query another Database/Knowledge Base (such as DBpedia, FreeBase or WikiData) and combine it to the results, how is it possible please ? What do I need to write ?

I can give more information if necessary.

w3spi
  • 4,380
  • 9
  • 47
  • 80
Olscream
  • 127
  • 1
  • 14
  • SPARQL 1.1 Service if one of the two SPARQL endpoints supports this. ARC2 doesn't have any federated query engine as I can see. – UninformedUser May 18 '17 at 12:53
  • Is it then possible to query DBpedia and Wikidata in the same time through a PHP or JAVA script ? Or would you know a way to get round please ? – Olscream May 18 '17 at 18:02
  • What do you mean by same time? Indeed you could join results from both endpoint in your client code. Otherwise, as I said try to use SPARQL 1.1 federated querying via the `SERVICE` feature first. But as I said, I don't know what exactly you want to do. – UninformedUser May 18 '17 at 18:18
  • I mean, do the same query but for 2 different Databases (DBpedia and Wikidata), a bit like here : http://stackoverflow.com/questions/41353093/query-both-dbpedia-and-wikidata-at-the-same-time. I tried to write "SERVICE " like in this example but it seems that the feature isn't recognized. Do you mean that I have to use in this way ? Or you have another idea ? – Olscream May 18 '17 at 22:49
  • Why can't you be more concrete? Which query do you want to run on both datasets? And what does not work? And then, if the queries are unrelated, why can't you run both queries separately? – UninformedUser May 19 '17 at 06:51
  • I would like to retrieve from DBpedia the name, birthdate, birthplace, image, etc... of all actors dead after 1950. The results are given as a HTML/PHP table. Then, I would like also to retrieve from Wikidata for every actor, the awards, the IMDB ID etc...and add them for the correct actor (at the corresponding column/row in order words) of the table. That's why I think both queries are associated because I have to find common properties (name,, birthplace etc...) in order to fill in properly the table of results. – Olscream May 19 '17 at 08:44
  • You should know that for that case you have to find the part that relates two datasets. reps. the actor in your case. Obviously both use different URIs. Do you understand what I mean? – UninformedUser May 19 '17 at 08:45
  • When I tried to add FROM as "SELECT ... FROM url...", there is a bug. And when I tried to put SERVICE {} as described on the Stack Overflow URL I wrote before, it also doesn't work and return "Query errorsArray ( [0] => Incomplete or invalid Group Graph pattern. Could not handle " SERVICE Actor Name... Is there another way to "federate" queries ? – Olscream May 19 '17 at 08:48
  • I think I understand. You mean, I have to find a part which will permit to associate information from both databases to the corresponding actor. And this part has to be common to both databases, that is to say information like the combination of birthdate/birthplace/deathdate/nationality here (it's not perfect but it would decrease significanly the number of namesakes) in other words. So you mean that I do the both queries separately and then I fill the table by comparing those data ? – Olscream May 19 '17 at 08:59
  • Remove thank marks – w3spi May 20 '17 at 21:42

0 Answers0