时间和非时间性查询之间的区别是什么 [英] What is the difference between a temporal and a non-temporal query

查看:117
本文介绍了时间和非时间性查询之间的区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了一些讨论时间和非时间性查询的资源,特别是SPARQL。这两种查询有什么区别?

I have read some resources that talk about temporal and non-temporal queries, specifically with SPARQL. What is the difference between these two kinds of queries?

推荐答案

因为你没有提到一个具体的文档,查询,我只能给出一个相当广泛的答案:

As you don't refer to a specific document that talks about temporal queries, i can only give a pretty broad answer:

有很多方法如何建模RDF中的时间约束事实。由于RDF本身只关心三元组/四元组(主语,谓词,对象(,图)),许多简单的映射方法生成在映射时为真的三元组,但很容易过时和错误。一个例子是

There are many approaches on how to model temporally constrained facts in RDF. As RDF itself is only concerned with triples/quads (subject, predicate, object(, graph)), many simple mapping approaches generate triples which are true at the time of mapping, but are prone to be outdated and wrong soon. One example is

dbpedia:Barack_Obama dbpedia-owl:office "President of the United States" .

虽然这是真的,但在2017年很可能是错的,因为他已经在他的第二期。然而,如上所述,它总是真的,这导致很多并发症。

While this is true at the moment, it will very likely be wrong in 2017 as he's already in his second term. Nevertheless as stated above it would always be true, which causes a lot of complications.


这两种查询有什么区别?

What is the difference between these two kinds of queries?

通常,可以通过查看SPARQL查询来回答。如果它以某种方式要求在某个时间/期间有效的语句,那么它是一个时间查询。如果它不包含任何定时信息,它通常不是(虽然你的端点可能隐式添加一个只有事实有效的约束)。

In general this can be answered by looking at your SPARQL query. If it somehow asks for a statement valid at a time / during a period, then it's a "temporal" query. If it doesn't contain any of that timing information it usually isn't (though your endpoint might implicitly add a "only facts valid now" constraint).

如何

一种用于建模时间有限语句的方法(即 DBpedia实际使用)是通过使用符合条件的关系模式 /角色模型:

One approach to model temporal limited statements (that is actually used by DBpedia) is by using a qualified relation pattern / "role model":

dbpedia:Barack_Obama dbpedia-owl:termPeriod dbpedia:Barack_Obama__1 .
dbpedia:Barack_Obama__1 dbpedia-owl:activeYearsStartDate "2009-01-20"^^xsd:date .
dbpedia:Barack_Obama__1 dbpedia-owl:office "President of the United States" .
...



资料



另一种方法是使用reification来声明这样的语句:

Reification

Another approach would be to use reification to make statements about the statement like this:

ex:Barack_Obama_presidency_stmt rdf:type rdf:Statement .
ex:Barack_Obama_presidency_stmt rdf:subject dbpedia:Barack_Obama .
ex:Barack_Obama_presidency_stmt rdf:predicate dbpedia-owl:office .
ex:Barack_Obama_presidency_stmt rdf:object "President of the United States" .
ex:Barack_Obama_presidency_stmt ex:activeYearsStartDate "2009-01-20"^^xsd:date .



整个图表的出处时间



另一种方法是为在端点上可访问的每个图提供源出信息,例如与 http://www.w3.org/TR/prov-o/#generatedAtTime 。在这些情况下,您可以在SPARQL查询中使用此类信息来请求在给定时间范围内生成的图形,然后与其三元组匹配。

Provenance timing on whole graphs

Yet another approach is to provide provenance information for each graph that is accessible on the endpoint, e.g. with http://www.w3.org/TR/prov-o/#generatedAtTime . In those cases you can use such information within your SPARQL query to ask for graphs that were generated in a given time-frame and then match against their triples.

最后但并非最不重要的是,有一些方法尝试在SPARQL语言本身中引入特殊语法或标准化这些临时查询,例如:

Last but not least there are quite some approaches that try to introduce a special syntax or standardize such temporal queries in the SPARQL language itself, e.g.:

  • https://www.merlin.uzh.ch/publication/show/201
  • http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.298.8948&rep=rep1&type=pdf

但是由于这个答案显示这样的标准化远未得到普遍接受/实施。

But as this answer shows such a standardization is far from generally accepted / implemented.

由于缺乏标准化及其实际验收,时间SPARQL查询需要考虑查询数据模型这样的时间信息。

Because of the lack of standardization and its practical acceptance, "temporal SPARQL" queries need to take into account how the queried data models such temporal information.

这是一个社区wiki答案,随时可以扩展。

This is a community wiki answer, feel free to expand.

这篇关于时间和非时间性查询之间的区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆