4 Replies Latest reply on Dec 7, 2007 6:54 PM by Mannamal-Oracle

    To connect nodes outside query: rulebase, ontology or network data model?

    610482
      If my ontology consists of three classes: A, B, C and each has the attribute hasName. They connect like this A->B->C (A.hasB and B.hasC).

      In my sparql query I want to just state the name filters on the nodes; A.hasName="foo" and C.hasName="bar". I would like either a rulebase or semantic inference to apply (or hold) the logic that A connects to B which connects to C when running the query. That way I do not have to put the connection logic into each sparql query (like you do in an sql statement where you specify foreign/primary key connections in the where clause)

      What is the right way to implement/define the connections between the classes in an ontology? Is it rules? It looks like I can basically load my owl file but the Oracle docs are a little vague in this area. I am also not finding the right information on NDM to know if that is the right path.

      Any guidance or suggestions would be great. Thanks.
        • 1. Re: To connect nodes outside query: rulebase, ontology or network data model?
          Mannamal-Oracle
          If I understand your question right you want to model transitivity, and there are two ways this can be done. In both cases the connections would be made automatically and there would be no need to explicitly state the connection in the query.

          (1) Using rulebases: Refer to section 1.3.6 in the documentation. You can create a rulebase as in the example, and specify a rule similar to the following:
          INSERT INTO mdsys.semr_example_rb VALUES(
          'hasName_transitive_rule',
          '(?x :hasName ?y) (?y :hasName ?z)',
          NULL,
          '(?x :hasName ?z)',
          SEM_ALIASES(SEM_ALIAS('','http://www.myexample.org/myexample/')));

          This is possible in both 10gR2 and 11g.

          (2) By making :hasName a transitive property in OWL, and use the native OWL inferencing feature in 11g to infer the connections. This is possible only in 11g.

          Melli
          • 2. Re: To connect nodes outside query: rulebase, ontology or network data model?
            610482
            I guess my example was not very clear, apologies. Let me try again. I still have the three classes. A->B->C as before. A has attributes hasName and hasB, B has the attribute hasC and C has the attribute hasDog.

            Now, I want to find all C instances that have satisfy two qualifiers: hasDog = "Fido" AND are linked (via B) to an A instance with a hasName ="foo". Do I need to specify that C instances link to A instances via B or is that in the rules/ontology support? Do the links need to be bidirectional for this to work?

            I appreciate your assistance, I am still learning this technology.
            • 3. Re: To connect nodes outside query: rulebase, ontology or network data model?
              610482
              Hello Melli
              You wrote:
              (2) By making :hasName a transitive property in OWL, and use the native OWL inferencing feature in 11g to infer the connections. This is possible only in 11g.

              Can you send me an example of this please!?!

              hasName is a dataType property. From objectType properties such as hasB and hasC, can the reasoner deduce that A links to C via B?
              • 4. Re: To connect nodes outside query: rulebase, ontology or network data model?
                Mannamal-Oracle
                I am sorry for the delayed response.

                Based on your second post I have a better understanding but still have some questions. Can you to write to me at melliyal <dot> annamalai <at> oracle <dot> com, as it might be easier to discuss this over email? We can post a summary response on this site when we have the best answer.

                Melli