On Github SUNY-Albany-CCI-LearningEncounters / RDF-Introduction-Part-I
Created by Luis Ibanez
subject predicate object .
[Bob]----[is a]----[person] . [Bob]----[was born on]----[4th July 1990] . [Bob]----[is a friend of]----[Alice] . [Bob]----[is interested in]----[Mona Lisa] . [Mona Lisa]--[was created by]--[Leonardo da Vinci] .
Leonardo da Vinci
can appear in all three positions in a triplet
http://dbpedia.org/resource/Leonardo_da_Vinci
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT ?thing WHERE { ?thing dbo:state dbr:New_York . }
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT ?thing WHERE { ?thing dbo:state dbr:New_York . } ORDER BY DESC(?thing) LIMIT 20
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT ?thing ?rel WHERE { ?thing ?rel dbr:New_York . } ORDER BY DESC(?thing) LIMIT 20
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT ?movie WHERE { ?movie dbo:starring dbr:Kevin_Bacon . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT ?movie ?actor WHERE { ?movie dbo:starring dbr:Kevin_Bacon . ?movie dbo:starring ?actor . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT DISTINCT ?actor WHERE { ?movie dbo:starring dbr:Kevin_Bacon . ?movie dbo:starring ?actor . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT DISTINCT ?actor2 WHERE { ?movie1 dbo:starring dbr:Kevin_Bacon . ?movie1 dbo:starring ?actor1 . ?movie2 dbo:starring ?actor1 . ?movie2 dbo:starring ?actor2 . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT DISTINCT ?movie ?director WHERE { ?movie dbo:starring dbr:Kevin_Bacon . ?movie dbo:director ?director . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT DISTINCT ?rel ?sub WHERE { dbr:Fukushima_Daiichi_Nuclear_Power_Plant ?rel ?sub . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT DISTINCT ?supplier WHERE { dbr:Fukushima_Daiichi_Nuclear_Power_Plant dbp:reactorSupplier ?supplier . } LIMIT 50
PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX dbp: <http://dbpedia.org/property/> PREFIX dbr: <http://dbpedia.org/resource/> SELECT DISTINCT ?supplier ?plant WHERE { dbr:Fukushima_Daiichi_Nuclear_Power_Plant dbp:reactorSupplier ?supplier . ?plant dbp:reactorSupplier ?supplier . } LIMIT 50