CBDB Linked Open Data
CBDB Linked Open Data was developed and is maintained by Shanghai Library
Link: CBDB SPARQL query page
WebVOWL: CBDB ontology visualization
Here are some sample SPARQL queries you can try on the SPARQL query page:
Death age of all CBDB persons
PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX shlib: <http://www.library.sh.cn/ontology/>SELECT ?ageFROM <http://lod.library.sh.cn/graph/cbdb> WHERE { ?s shlib:deathAge ?age. filter (?age != '490' && ?age != '0').} order by asc(xsd:int(?age))
Death age of women in CBDB
PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX shlib: <http://www.library.sh.cn/ontology/>SELECT ?age FROM <http://lod.library.sh.cn/graph/cbdb> WHERE { ?s shlib:deathAge ?age ; foaf:gender '女' . filter (?age != '0')} order by asc(xsd:int(?age))
Top 10 most common last names in Tang Dynasty
PREFIX bf: <http://id.loc.gov/ontologies/bibframe/>PREFIX shlib: <http://www.library.sh.cn/ontology/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX dc: <http://purl.org/dc/elements/1.1/>PREFIX owl: <http://www.w3.org/2002/07/owl#>SELECT DISTINCT ?surname (COUNT(DISTINCT ?sub) AS ?count)FROM <http://lod.library.sh.cn/graph/cbdb> WHERE { ?sub shlib:temporal/shlib:dynasty '唐'@cht ; shlib:familyName/bf:label ?surname. filter (lang(?surname) = 'chs')} group by ?surname order by desc(2) limit 10
The social network of the persons biograpical information equals 劍南道 in Tang dynasty
PREFIX bf: <http://id.loc.gov/ontologies/bibframe/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX dct: <http://purl.org/dc/terms/>PREFIX shl: <http://www.library.sh.cn/ontology/>PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX dc: <http://purl.org/dc/elements/1.1/>PREFIX owl: <http://www.w3.org/2002/07/owl#>select ?personUri ?personId ?personName ?personAddr ?assoUri ?assoId ?assoName ?assoAddr ?relation from <http://lod.library.sh.cn/graph/cbdb> from <http://lod.library.sh.cn/graph/place> where {?rel shl:relationSubject ?personUri ; shl:relationObject ?assoUri; shl:relationType ?relation ; shl:specialRelationType "社会关系".?personUri a shl:Person ; foaf:name ?personName ; shl:place ?uri ; shl:identifiedBy ?id. ?uri owl:sameAs ?place . ?id dc:source 'CBDB'; rdfs:label ?personId . ?place a shl:Place; bf:label ?personAddr ; dct:isPartOf* ?part. ?part bf:label ?label .filter (bif:contains(?label, '"劍南道"') || bif:contains(?personAddr, '"劍南道"'))filter (lang(?personAddr) = "cht")filter (lang(?personName) = "cht")?assoUri a shl:Person; foaf:name ?assoName ; shl:place ?uri1; shl:identifiedBy ?id1. ?id1 dc:source 'CBDB'; rdfs:label ?assoId . ?uri1 owl:sameAs/bf:label ?assoAddr . filter (lang(?assoAddr) = "cht")filter (lang(?assoName) = "cht")}