Reputation: 24662
I want to build a queryable RDF database of events of the form:
:Bob :played :musiccd :at "00:00:00 UTC on 1 January 1970"
Is this possible with RDF/N3/3store/SPARQL?
Does SPARQL know how to compare datetimes and test for membership in datetime ranges? If not, how easy is it to extend SPARQL to do so for a given datetime format?
Upvotes: 1
Views: 1389
Reputation: 696
(Since I cannot comment right now. I'll post this as reply.)
@mcandre: please have a look at the Play Back Ontology and the Counter Ontology for modelling your intended use case
Upvotes: 2
Reputation: 28655
SPARQL supports the xsd:dateTime
natively, many stores will also handles xsd:date
and xsd:time
as well
If you use a SPARQL 1.1 compliant engine then there are also a bunch of new functions that will let you extract specific sections of dates and times.
Therefore you should be able to write SPARQL queries appropriate to your data
For help with modeling time in RDF and how that affects the formulation of your SPARQL queries see Ian Davis's blog post series on the topic
Upvotes: 3