google / badwolf

Temporal graph store abstraction layer.
Apache License 2.0
983 stars 66 forks source link

Consider SPARQL-style "named graphs" construct for temporal aspects #7

Closed danbri closed 9 years ago

danbri commented 9 years ago

In W3C SPARQL, a collection of triples can be structured in terms of named graphs, and a query expression can refer to these (directly by identifier, or using variables). Have you considered applying this structure for your temporal query facilities? e.g. http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#namedGraphs and nearby.

bruth commented 9 years ago

It appears you can create multiple named graphs and query one or more (see the second query). Is this analogous or do SPARQL named graphs have another feature?

xllora commented 9 years ago

Yes, you can list and arbitrary list of bindings on the FROM clause. A query will extend across all the graphs. This is a simplified version with no URI semantics.

danbri commented 9 years ago

... but can a "graph" be created based on temporal characteristics of the data?

lisp commented 9 years ago

this sounds like a very valuable feature, but there is some asymmetry to the graph clause. in a quad store, the graph designators are arbitrary atomic iri or blank node terms with no inherent relation among the values, while badwolf's temporal anchors both posses internal structure and stand in (well) defined relations. if they are to be used as direct designators rather than secondary constraints on graph designators the clause will need to behave other than a graph clause in sparql. it comes down to what one would want to express when iterating over them or selecting.

danbri commented 9 years ago

Thanks. I suppose the subtext was: can this system be encapsulated behind something that looks more like classic W3C SPARQL 1.1, without hiding its more interesting features.

BTW over in schema.org we have a pattern for qualifying triples (including temporally) via an intermediate node, documented at http://schema.org/Role ... I'm trying to figure out how that might fit with the badwolf approach.

lisp commented 9 years ago

maybe, rather than constraining, the between the subtext lines were, if the designator is no longer atomic, given the difference in the designator domain, what would a sparql revisions clause look like?

on the topic of qualified triples, there are a couple relatively recent papers on temporal annotation which go through the variations, one in the dbpedia context and the other, in general: http://users.dcc.uchile.cl/~dhernand/research/ssws-2015-reifying.pdf http://www.dfki.de/web/research/publications/renameFileForDownload?filename=isa10.pdf&file_id=uploads_2284

they might help to lay out your options. keep in mind however, that they presume the storage model does not include first-class reification. if it does, most of the described structures collapse into much simpler forms.

xllora commented 9 years ago

@danbri How is that different from insert into graphs a la http://www.w3.org/TR/sparql11-update/#deleteInsert ? Right now, we are focus on getting the basic select/insert/delete in. We are going to tackle nested ones after, that would allow you to create intermediate graphs for re querying/combining.