2 Replies Latest reply on Aug 24, 2010 1:51 PM by 793115

    Incremental inferencing failing after insert

    793115
      I have created two entailments using both RDFS and OWLSIF rulebases with incremental inferencing specified as follows:

      begin
      sem_apis.create_entailment ('r_ix', sem_models('example'), sem_rulebases('RDFS'),null,null, 'INC=T');
      sem_apis.create_entailment ('o_ix',sem_models('example'), sem_rulebases('OWLSIF'),null,null, 'INC=T');
      end;

      I insert a triple, such as:

      INSERT INTO example_data (triple) VALUES (SDO_RDF_TRIPLE_S('example', 'http://www.example.com/eg#Example1,'<http://www.w3.org/2000/01/rdf-schema#label>', '"First example"^^<http://www.w3.org/2001/XMLSchema#string>'));

      commit;

      The insert statement appears to be successful with one row inserted. I perform the following query :

      SELECT s,p,o FROM TABLE(SEM_MATCH(
      '{?s ?p ?o}',
      SEM_Models('example'),
      SDO_RDF_Rulebases('RDFS'),
      SEM_ALIASES(SEM_ALIAS('','http://www.example.com/eg#)),null))
      order by p;

      which fails with:
      SQL Error: ORA-20000: We do not have a rules index for this Model-Rulebase combination
      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 812
      ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 235

      Now this is the same outcome I have seen previously when I had omitted "INC=T" from initial entailment creation and attempted to perform updates to data without rebuilding the associated indexes. Is my expectation, that I should be able to perform insertions to the model and subsequent queries should succeed without error and more importantly without a requirement to rebuild the entailments, correct? Is there anything I am missing to get this working as expected?

      Just to note, I tried the following method to create entailments, which also failed with the same error as previously specified.

      sem_apis.create_entailment ('r_ix',sem_models('example'), sem_rulebases('RDFS'));
      sem_apis.create_entailment ('o_ix',sem_models('example'), sem_rulebases('OWLSIF'));
      sem_apis.enable_inc_inference('r_ix');
      sem_apis.enable_inc_inference('o_ix');

      I've also tried creating just one entailment and performing the insertion/selection as above, but this yields the same result.
      Any thoughts would be greatly appreciated.

      Thanks,
      Barbara