5 Replies Latest reply on Dec 10, 2009 12:56 AM by alwu-Oracle

    UOBM query returning 0 results

    737914
      Hi,

      We are performing benchmarking of several RDF engines using the UOBM benchmark. I was suprised that ORACLE's engine answered only 3 out of the 15 SPARQL queries provided by the benchmark (as opposed to the BIGOWLIM engine for instance, which answered all 15 queries). For example Query#2 (below), requires basic inferencing (OWL Restriction property) as explained in the UOBM paper (ref below) but it returns 0 results:

      [Query 2] SELECT DISTINCT ?x
      WHERE { ?x rdf:type benchmark:Employee }
      Description: Find out all employees
      Domain(worksFor, Employee), <a worksFor b> -> <a rdf:type Employee>
      Domain(worksFor,Employee), researchAssistant worksFor.ResearchGroup->researchAssistant 'is' Employee

      Queries that do not involve the inferencing above execute fine, for instance I can retrieve the individuals that are annotated as ResearchAssistant, but I cannot infer them as Employees.

      I've followed the best practice recomendations for setting-up the semantic store and coded my load/query logic based on the examples supplied with the Jena_Adapter _2 documentation. Extracts from the owl file and the Java code are supplied below.

      Your help is appreciated
      Taha

      ++++++++++++++++++++++
      Java code:

      //intialise Oracle's semantic model (OSM)
      Oracle oracle = new Oracle(jdbcUrl, userName, password);
      ModelOracleSem model = ModelOracleSem.createOracleSemModel(oracle, modelName);
      // load UOBM ontology
      InputStream in = FileManager.get().open("univ-bench-oracle.owl" );
      model.read(in, null);
      //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      //query the model using SPARQL/OWLPRIME rulebase
      Attachment attachment = Attachment.createInstance(
      new String[] {}, "OWLPRIME",
      InferenceMaintenanceMode.NO_UPDATE,QueryOptions.DEFAULT);
      GraphOracleSem graph = new GraphOracleSem(oracle, modelName, attachment);
      //probably not required as entailment forces reasoning
      graph.performInference();
      ModelOracleSem model3 = new ModelOracleSem(graph);
      String queryString = "SELECT DISTINCT ?x WHERE { " +
      "?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> " +
      "<http://semantics.crl.ibm.com/univ-bench-dl.owl#Employee> }";
      Query query = QueryFactory.create(queryString);
      QueryExecution qexec = QueryExecutionFactory.create(query, model3) ;
      try {
      int iTriplesCount = 0;
      ResultSet results = qexec.execSelect();
      for ( ; results.hasNext() ; ) {
      QuerySolution soln = results.nextSolution() ;
      iTriplesCount++;
      }
      System.out.println("Inferred triples count: " + iTriplesCount);
      }
      finally {
      qexec.close();
      }
      model.close();
      oracle.dispose();

      ++++++++++++++++++++++
      OWL file:

      <owl:Class rdf:about="&univ-bench-dl;Employee">
      <rdfs:label>Employee</rdfs:label>
      <owl:equivalentClass>
      <owl:Class>
      <owl:intersectionOf rdf:parseType="Collection">
      <rdf:Description rdf:about="&univ-bench-dl;Person"/>
      <owl:Restriction>
      <owl:onProperty rdf:resource="&univ-bench-dl;worksFor"/>
      <owl:someValuesFrom rdf:resource="&univ-bench-dl;Organization"/>
      </owl:Restriction>
      </owl:intersectionOf>
      </owl:Class>
      </owl:equivalentClass>
      </owl:Class>

      <owl:Class rdf:about="&univ-bench-dl;ResearchAssistant">
      <rdfs:label
      >university research assistant</rdfs:label>
      <rdfs:subClassOf rdf:resource="&univ-bench-dl;Person"/>
      <rdfs:subClassOf>
      <owl:Restriction>
      <owl:onProperty rdf:resource="&univ-bench-dl;worksFor"/>
      <owl:someValuesFrom rdf:resource="&univ-bench-dl;ResearchGroup"/>
      </owl:Restriction>
      </rdfs:subClassOf>
      </owl:Class>

      <univ-bench-dl:ResearchAssistant rdf:about="#Mike_Earl">
      <univ-bench-dl:worksFor rdf:resource="#GATE"/>
      </univ-bench-dl:ResearchAssistant>

      <univ-bench-dl:ResearchGroup rdf:about="#GATE"/>

      ++++++++++++++++++++++
      Find the UOBM paper at:
      http://domino.research.ibm.com/comm/research_people.nsf/pages/xieguot.pubs.html/$FILE/benchmark.pdf
        • 1. Re: UOBM query returning 0 results
          alwu-Oracle
          Hi,

          What is your database version?

          Note that more OWL semantics are supported in Oracle Database 11g Release 2. You can check the create_entailment API in the following doc

          http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/sem_apis_ref.htm#CHDDAHAF

          Cheers,

          Zhe Wu
          • 2. Re: UOBM query returning 0 results
            737914
            Thanks Zhe for pointing out the SEM_APIS resource, I'm aware of it, but I have to perform all my operation at the Java API (Jena Adapter 2) level. As far as I understand, I've specified the most expressive inferencing that Oracle allows (OWL Prime), I also indicate that I do not perform chaining (NO_UPDATE) and do not require loading additional models (new String[] {}) :

            Attachment.createInstance(new String[] {}, "OWLPRIME", InferenceMaintenanceMode.NO_UPDATE,QueryOptions.DEFAULT);

            Is there anything in the code I submitted earlier disadvantaging the inferencing process, or is it simply that processing this type of query is beyond OWL-PRIME capabilities? I'm perplexed because the Jena_Adapter_2 uses allows the use of the Pellet reasoner, and when I use the same reasoner with Protege for instance, the query is executed correctly.

            I am using the 11g R1 as release 2 is not available for windows platforms.

            Cheers
            Taha
            • 3. Re: UOBM query returning 0 results
              alwu-Oracle
              Hi,

              Actually, when you call the performInference API, you can specify additional components. I pointed you to the documentation describing those new component names introduced in 11.2.

              Unfortunately those new semantics (inference components) support are not in Oracle Database 11g Release 1. Is it possible at all to try it on Linux platform?

              Thanks,

              Zhe Wu
              • 4. Re: UOBM query returning 0 results
                737914
                We are extensively benchmarking a number of tools, and it would be difficult to rerun all the performed experiments on UNIX to guarantee fair analysis setup. I look forward to the Windows release of 11.2. Any idea when we can expect that?

                I'll inform you (the forum) if we manage to put together the resources to rerun the experiments on Linux before the Windows version of 11.2 is released.

                Thanks
                Taha
                • 5. Re: UOBM query returning 0 results
                  alwu-Oracle
                  Hi,

                  Are you a 11.2.0.1 beta customer?

                  Thanks,

                  Zhe Wu