Hi Naga,

On 09/20/2012 03:07 PM, Naga Hl wrote:
Hi,
I've tried some sample queries with SPARQL. I would want to know, how to write a query which should fetch different properties based on type.

For example:

With a given "KEYWORD",
if the KEYWORD is a city name, the query should fetch the country, population, etc., if the KEYWORD is a person name, the same query should fetch the date of birth, Known for, etc.,

If I understand what you want to do correctly, then the following SPARQL query can achieve that (assuming the keyword you are looking for is "Paris")

   SELECT * WHERE { ?s rdfs:label "Paris"@en. ?s ?p ?o. }



Is it possible to write a query like that?! Even if it is possible, whether it would be efficient? If it is not the right way, then how can I get such type based information?

This way of achieving it is efficient, as long as you know the exact keyword, as you can notice when you run it, i.e. it is a quite fast query.


If the question is too simple, please do forgive me. Is there any reference URL to learn such querying(More than the basic queries)?

Thanks,
Naga


--
Kind Regards
Mohamed Morsey
Department of Computer Science
University of Leipzig

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to