Firstly, your request contains many syntax issues:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX type: <http://dbpedia.org/class/yago/> PREFIX prop: <http://dbpedia.org/property/> ^ you probably want to use the dbpedia-owl properties which are
Gradually create some of these queries gradually, because then you can find out what properties some of the resources have, and then you can expand your query a little more. The public endpoint has a number of predefined namespaces , and using these methods will make it easier to read by your other request. So you can start by asking for people:
SELECT * WHERE { ?person a dbpedia-owl:Person . } LIMIT 10
SPARQL Results
After seeing that this works, you can look at some of the returned instances and see that they have the dbpedia-owl:commonName properties, and then expand the query:
SELECT * WHERE { ?person a dbpedia-owl:Person ; dbpedia-owl:commonName ?commonName . } LIMIT 10
SPARQL Results
It is easy enough to expand it with the dbpedia-owl:birthDate . I donβt see the nationality predicate for the instances I was looking at, so I'm not sure what you based your query on nationality on. Although I have seen some use of the knownFor property, I have not seen it in many cases, so if you make it mandatory, you will exclude many people. However, such an incremental approach is likely to help you in the long run.
Property Search
While a searchable ontology provides a good way to search for classes, I'm not sure if there is such a good way to search for properties. However, you can do something rude. For example, to find all the properties that were actually used for Person s, you can run a query like the one below. (Note: this query takes some time to complete, so if you use it, you should probably download the results.)
select distinct ?p where { [] a dbpedia-owl:Person ; ?p [] . }
SPARQL Results
I note that dbpedia-owl:nationality appears in this list.
To get all the properties for everything, you can load the ontology and run a query like:
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix owl: <http://www.w3.org/2002/07/owl
I ran this locally using Jena ARQ:
$ arq --query properties.sparql --data dbpedia_3.8.owl ---------------------------------------------------------------------------- | p | ============================================================================ | <http://dbpedia.org/ontology/regionServed> | | <http://dbpedia.org/ontology/coachedTeam> | | <http://dbpedia.org/ontology/legalForm> | | <http://dbpedia.org/ontology/goldenCalfAward> | | <http://dbpedia.org/ontology/composer> | | <http://dbpedia.org/ontology/owningOrganisation> | | <http://dbpedia.org/ontology/branchFrom> | | <http://dbpedia.org/ontology/iso6393Code> | ... | <http://dbpedia.org/ontology/classification> | | <http://dbpedia.org/ontology/bgafdId> | | <http://dbpedia.org/ontology/currencyCode> | | <http://dbpedia.org/ontology/onChromosome> | | <http://dbpedia.org/ontology/course> | | <http://dbpedia.org/ontology/frequentlyUpdated> | | <http://dbpedia.org/ontology/distance> | | <http://dbpedia.org/ontology/volume> | | <http://dbpedia.org/ontology/description> | ----------------------------------------------------------------------------
This will not provide rdfs:domain and rdfs:range , but you can also request them or just for these properties using rdfs:range dbpedia-owl:Person (but note that this will not get all the properties that Person can use as the range may be more or less specific):
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix owl: <http://www.w3.org/2002/07/owl#> prefix dbpedia-owl: <http://dbpedia.org/ontology/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> select ?p ?range where { { ?pa owl:ObjectProperty } UNION { ?pa owl:DatatypeProperty } ?p rdfs:domain dbpedia-owl:Person ; rdfs:range ?range . } $ arq --query properties.sparql --data dbpedia_3.8.owl | head -------------------------------------------------------------------------------------------------------- | p | range | ======================================================================================================== | dbpedia-owl:restingPlacePosition | <http://www.w3.org/2003/01/geo/wgs84_pos