sql - What is the difference between a temporal and a non-temporal query -


i have read resources talk temporal , non-temporal queries, sparql. difference between these 2 kinds of queries?

as don't refer specific document talks temporal queries, can give pretty broad answer:

there many approaches on how model temporally constrained facts in rdf. rdf concerned triples/quads (subject, predicate, object(, graph)), many simple mapping approaches generate triples true @ time of mapping, prone outdated , wrong soon. 1 example is

dbpedia:barack_obama dbpedia-owl:office "president of united states" . 

while true @ moment, wrong in 2017 he's in second term. nevertheless stated above true, causes lot of complications.

what difference between these 2 kinds of queries?

in general can answered looking @ sparql query. if somehow asks statement valid @ time / during period, it's "temporal" query. if doesn't contain of timing information isn't (though endpoint might implicitly add "only facts valid now" constraint).

how such timing information included depends on sparql endpoint , how data you're querying modeled.

some modeling approaches:

qualified relation pattern

one approach model temporal limited statements (that actually used dbpedia) using 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 united states" . ... 

reification

another approach use reification make statements statement 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 united states" . ex:barack_obama_presidency_stmt ex:activeyearsstartdate "2009-01-20"^^xsd:date . 

provenance timing on whole graphs

yet approach provide provenance information each graph accessible on endpoint, e.g. http://www.w3.org/tr/prov-o/#generatedattime . in cases can use such information within sparql query ask graphs generated in given time-frame , match against triples.

temporal sparql

last not least there quite approaches try introduce special syntax or standardize such temporal queries in sparql language itself, e.g.:

but answer shows such standardization far accepted / implemented.

conclusion

because of lack of standardization , practical acceptance, "temporal sparql" queries need take account how queried data models such temporal information.

this community wiki answer, feel free expand.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -