在 RDF 中表示 transactions/time

Representing transactions/time in RDF

我需要表示 electronic health records in RDF. This kind of data is time dependent. So, I want to represent them as events. I want to use something similar to a Datomic 数据库。 Datomic 使用带有附加事务字段的三元组。这个额外的字段带有时间戳并且可以有用户定义的元数据。 我想使用命名图来记录 transaction/time 数据。

例如,在下面的查询中,我只搜索在特定日期创建的特定编辑器的图表的三元组:

SELECT ?name ?mbox ?date
WHERE {
    ?g dc:publisher ?name ;
       dc:date ?date .
    GRAPH ?g
    { ?person foaf:name ?name ; foaf:mbox ?mbox }
}

像这样的查询可以解决我的问题。我的顾虑是:

I will end up with millions of named graphs. Will they make the SPARQL queries too slow?

一般来说,不一定,至少不会超过在一个命名图中添加数百万个三元组。但这真的取决于你的三元组,以及它在命名图上的索引有多好。

The triple store I am using, Blazegraph, has support for inference (entailments) but states that: "Bigdata does not support inference in the quads mode out of the box." Which triple stores do support inference using quads (named graphs)?

Whosebug 并不是寻求工具推荐的正确平台 - 我建议您 google 转而查看各种可用三元组的功能列表。

我还怀疑在您需要的规模下,推理性能可能会让您失望(同样,当然取决于实施)。你确定你需要推理吗?并不是说你绝对不应该,而是根据你需要的推理的表现力,在查询方面有一些创造性的方法。

Is there a better way to represent this kind of data in RDF? Some kind of best practices guideline?

这对我来说似乎是一个明智的方法。如果不进一步了解您打算使用此数据的方式、规模(三元组的数量)等,就很难判断另一种方法是否更好。至于最佳实践:这个 W3C note on N-Ary relations in RDF is a good resource. Also: .