6 Replies Latest reply on Dec 2, 2014 2:35 PM by Matperry-Oracle

    Oracles impementation of Canonical xsd types breaks OWL compatibility

    M.R. Strand

      We have a problem when handling Oracle Semantic models containing OWL ontologies. We are loosing information about the xsd type of the numbers, so that what the triples we put in are not the same as the triples we get out.

      For instance, inserting the triples:

       

      <owl:Restriction>

        <owl:onProperty rdf:resource="#hasParent" />

        <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">2</owl:minCardinality>

      </owl:Restriction>


      will provide the following answers on the query: SELECT * { ?restriction owl:minCardinality ?cardinality }

       

      restrictioncardinality
      _:b0"2" ^^<http://www.w3.org/2001/XMLSchema#decimal>

       

       

      Reading from the RDF Semantic Graph Overview, we see this passage:

      Duplicate triples are not stored in the database. To check if a triple is a duplicate of an existing triple, the subject, property, and object of the incoming triple are checked against triple values in the specified model. If the incoming subject, property, and object are all URIs, an exact match of their values determines a duplicate. However, if the object of incoming triple is a literal, an exact match of the subject and property, and a value (canonical) match of the object, determine a duplicate. For example, the following two triples are duplicates:

      <eg:a> <eg:b> <"123"^^http://www.w3.org/2001/XMLSchema#int> <eg:a> <eg:b> <"123"^^http://www.w3.org/2001/XMLSchema#unsignedByte> 

      The second triple is treated as a duplicate of the first, because "123"^^<http://www.w3.org/2001/XMLSchema#int> has an equivalent value (is canonically equivalent) to"123"^^<http://www.w3.org/2001/XMLSchema#unsignedByte>. Two entities are canonically equivalent if they can be reduced to the same value.

       

       

      In other words, it looks like this behaviour is by design, which puts us in a bind. To be OWL compliant, you can't have cardinality restrictions with decimal numbers. (See OWL Web Ontology Language Reference .) And if our ontologies are not OWL compliant, we cannot use reasoners on it, and we must be able to do that.

       

       

      Do you have any suggestions on how to solve this problem? We need to be able to ask Oracle models for xsd:nonNegativeIntegers, both using SEM_MATCH, and through the jena/joseki- SPARQL endpoint.

       

      Thank you very much in advance