创建两个JenaTDB数据库/图表/数据集。一个有小数据,一个有大数据。小型数据库具有如下的RDF数据,并且大型数据库具有相同的上述RDF数据的大量副本。
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dct="http://purl.org/dc/terms/"
>
<dcat:Dataset rdf:about="https://catalog.data.gov/dataset/demographic-statistics-by-zip-code-acfc9">
<owl:sameAs rdf:resource="urn:uuid:8a311c18-3060-438e-a8c7-9e37bcde6529"/>
<dct:description>Demographic statistics broken down by zip code</dct:description>
<dcat:keyword>area</dcat:keyword>
<dcat:keyword>boundary</dcat:keyword>
<dcat:keyword>code</dcat:keyword>
<dcat:keyword>community</dcat:keyword>
<dcat:keyword>demographic</dcat:keyword>
<dcat:keyword>demography</dcat:keyword>
<dcat:keyword>development</dcat:keyword>
<dcat:keyword>district</dcat:keyword>
<dcat:keyword>lifelong-learning</dcat:keyword>
<dcat:keyword>statistic</dcat:keyword>
<dcat:keyword>youth</dcat:keyword>
<dcat:keyword>zip</dcat:keyword>
<dcat:keyword>zip-code</dcat:keyword>
<foaf:homepage rdf:resource="https://catalog.data.gov/dataset/demographic-statistics-by-zip-code-acfc9"/>
<rdfs:label>demographic-statistics-by-zip-code-acfc9</rdfs:label>
<dct:identifier>demographic-statistics-by-zip-code-acfc9</dct:identifier>
<dct:title>Demographic Statistics By Zip Code</dct:title>
<dcat:distribution>
<dcat:Distribution>
<dcat:accessURL rdf:resource="https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.csv?accessType=DOWNLOAD"/>
<dct:format>
<dct:IMT>
<rdf:value>CSV</rdf:value>
<rdfs:label>CSV</rdfs:label>
</dct:IMT>
</dct:format>
<dct:title>Comma Separated Values File</dct:title>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dcat:accessURL rdf:resource="https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.rdf?accessType=DOWNLOAD"/>
<dct:format>
<dct:IMT>
<rdf:value>RDF</rdf:value>
<rdfs:label>RDF</rdfs:label>
</dct:IMT>
</dct:format>
<dct:title>RDF File</dct:title>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dcat:accessURL rdf:resource="https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.json?accessType=DOWNLOAD"/>
<dct:format>
<dct:IMT>
<rdf:value>JSON</rdf:value>
<rdfs:label>JSON</rdfs:label>
</dct:IMT>
</dct:format>
<dct:title>JSON File</dct:title>
</dcat:Distribution>
</dcat:distribution>
<dcat:distribution>
<dcat:Distribution>
<dcat:accessURL rdf:resource="https://data.cityofnewyork.us/api/views/kku6-nxdu/rows.xml?accessType=DOWNLOAD"/>
<dct:format>
<dct:IMT>
<rdf:value>XML</rdf:value>
<rdfs:label>XML</rdfs:label>
</dct:IMT>
</dct:format>
<dct:title>XML File</dct:title>
</dcat:Distribution>
</dcat:distribution>
<dct:contributor>
<rdf:Description>
<foaf:name><Nobody></foaf:name>
</rdf:Description>
</dct:contributor>
<dct:relation>
<rdf:Description>
<rdfs:label>publisher</rdfs:label>
<rdf:value>data.cityofnewyork.us</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>accessLevel</rdfs:label>
<rdf:value>public</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>catalog_describedBy</rdfs:label>
<rdf:value>https://project-open-data.cio.gov/v1.1/schema/catalog.json</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>harvest_source_id</rdfs:label>
<rdf:value>50104281-92a3-4534-9d38-141bc82276c5</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>catalog_@context</rdfs:label>
<rdf:value>https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>issued</rdfs:label>
<rdf:value>2013-06-26</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>resource-type</rdfs:label>
<rdf:value>Dataset</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>modified</rdfs:label>
<rdf:value>2017-09-22</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>harvest_source_title</rdfs:label>
<rdf:value>NYC JSON</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>source_schema_version</rdfs:label>
<rdf:value>1.1</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>source_datajson_identifier</rdfs:label>
<rdf:value>True</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>theme</rdfs:label>
<rdf:value>[u'City Government']</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>catalog_@id</rdfs:label>
<rdf:value>https://data.cityofnewyork.us/data.json</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>catalog_conformsTo</rdfs:label>
<rdf:value>https://project-open-data.cio.gov/v1.1/schema</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>identifier</rdfs:label>
<rdf:value>https://data.cityofnewyork.us/api/views/kku6-nxdu</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>landingPage</rdfs:label>
<rdf:value>https://data.cityofnewyork.us/d/kku6-nxdu</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>harvest_object_id</rdfs:label>
<rdf:value>55c7ec00-93f3-467a-bf97-cfa1d28d2510</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>source_hash</rdfs:label>
<rdf:value>5ed3df91fa8c531bd164646dce3281d6ccd08d09</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>harvest_object_id</rdfs:label>
<rdf:value>55c7ec00-93f3-467a-bf97-cfa1d28d2510</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>harvest_source_id</rdfs:label>
<rdf:value>50104281-92a3-4534-9d38-141bc82276c5</rdf:value>
</rdf:Description>
</dct:relation>
<dct:relation>
<rdf:Description>
<rdfs:label>harvest_source_title</rdfs:label>
<rdf:value>NYC JSON</rdf:value>
</rdf:Description>
</dct:relation>
</dcat:Dataset>
</rdf:RDF>
我想通过使用下面的SPARQL查询来获取针对dct:identifier
谓词的所有三元组。
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?object
WHERE {
?subject dct:identifier "demographic-statistics-by-zip-code-acfc9".
?subject ?predicate ?object.
}
问题是SPARQL查询在小型数据库上运行正常,但不适用于大型数据库。有什么建议会出错吗?
EIDT 通过不工作我的意思是在JenaTDB的情况下,查询将持续执行数小时。