在RDF中表示数量

时间:2010-10-18 15:25:44

标签: sparql rdf turtle-rdf

我希望能够回答诸如“创建了多少记录并具有log_id 001”或“已使用属性”00EA“删除了多少条记录的查询。

34 records are created with attribute "00EC" and log_id "001"
32 records are updated with attribute "00EC" and log_id "001"
31 records are deleted with attribute "00EC" and log_id "001"

12 records are created with attribute "00EA" and log_id "001"
31 records are updated with attribute "00EA" and log_id "001"
33 records are deleted with attribute "00EA" and log_id "001"

9 records are created with attribute "00EB" and log_id "001"
2 records are updated with attribute "00EB" and log_id "001"
3 records are deleted with attribute "00EB" and log_id "001"

19 records are created with attribute "00EA" and log_id "002"
22 records are updated with attribute "00EA" and log_id "002"
33 records are deleted with attribute "00EA" and log_id "002"

1 个答案:

答案 0 :(得分:2)

我认为你得到了答案......

http://www.semanticoverflow.com/questions/1997/how-do-i-represent-this-data-as-an-rdf-graph

非常好。唯一要添加的是您拥有的数据是统计数据,因此它们可以表示为多维结构。表示此类数据的良好本体是SCOVO

所以这张唱片的代表......

[] a :LogEvent;
    :attribute "00EC";
    :log_id "001";
    :records_created 34;
    :records_updated 32;
    :records_deleted 31;
    .
可以使用以下模式级别表示来改进

....

:LogEvent rdfs:subClassOf scovo:Item .
:records_created rdfs:subPropertyOf scovo:Dimension .
(...)

此架构将“标记”您的数据,从而添加有关谓词和类的额外知识。 当您向系统中添加更多数据源时,您将意识到在模式级别定义它对于探索它非常有用。