W3C home > Mailing lists > Public > public-sparql-dev@w3.org > January to March 2015

Wikidata, SPARQL Y0K Problem

From: Markus Kroetzsch <markus.kroetzsch@tu-dresden.de>
Date: Fri, 27 Mar 2015 10:56:51 +0100
Message-ID: <55152963.5060908@tu-dresden.de>
To: SPARQL <public-sparql-dev@w3.org>
Dear all, especially former members of the SPARQL WG,

As you might know, the Wikimedia Foundation is currently working on 
setting up an official public SPARQL service for Wikidata. This was done 
not to integrate with RDF or to add to the semantic web, but simply 
because it seems to be the best technology for the query problem at 
hand. I think this should be considered a success :-) You are also 
welcome to play around with the preliminary test SPARQL endpoint of 
Wikidata, see [0], and of course to comment on the wikidata-l list 
regarding nice SPARQL queries or other ideas.

However, on the way to making this a reality as a fully integrated 
feature of Wikidata/Wikipedia, there are many issues to be solved. One 
that came up recently is about xsd:date(Time) in SPARQL 1.1. As you will 
know, XML Schema has changed the semantics of its date types in 
incompatible ways between XSD 1.0 and XSD 1.1:

* XSD 1.1: "-0001-02-03"^^xsd:date means "3rd Feb 2 BCE"  [1]
* XSD 1.0: "-0001-02-03"^^xsd:date means "3rd Feb 1 BCE"  [2]

Needless to say that this is a big deal in applications like Wikidata, 
where you have a lot of historical dates. The obvious question now is: 
What does "-0001-02-03"^^xsd:date mean when used in SPARQL? RDF? OWL? 
Here is what I have found so far:

* RDF 1.0: year 1 BCE
* OWL 1: year 1 BCE
* SPARQL 1.0: year 1 BCE
(all as expected)

* RDF 1.1: year 2 BCE [3]
* OWL 2: year 2 BCE [4]
* SPARQL 1.1: ???

It is interesting to note that the semantic changes in XSD, RDF and OWL 
each are breaking changes, which change the meaning of existing 
documents (where the document itself may not contain any hint as to 
whether it was created before or after the change).

I am not sure what is the case for SPARQL 1.1. It seems very much 
preferable if SPARQL would follow the other W3C standards in this 
matter, but I did not find out yet what was the intention of the SPARQL 
WG. All comments are welcome, but in the end we are looking for a 
normative answer here.

Best regards,

Markus


[0] 
https://www.mail-archive.com/wikidata-l@lists.wikimedia.org/msg05601.html (gives 
you the Wikidata endpoint URL, but more importantly also example queries 
for our current RDF translation, which we are currently revising in 
several places)
[1] http://www.w3.org/TR/xmlschema11-2/#dateTime
[2] http://www.w3.org/TR/xmlschema-2/#dateTime
[3] http://www.w3.org/TR/rdf11-concepts/#section-Datatypes
[4] http://www.w3.org/TR/owl2-syntax/#Datatype_Maps

-- 
Markus Kroetzsch
Faculty of Computer Science
Technische Universit├Ąt Dresden
+49 351 463 38486
http://korrekt.org/
Received on Friday, 27 March 2015 09:57:16 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 March 2015 09:57:16 UTC