1 Reply Latest reply on Jul 24, 2007 10:25 AM by Mannamal-Oracle

    How to make reifications and  query to obtain them

    586185
      Hello;

      If the option expressed in the previous thread is unavailable the other option is make reifications over the triple.

      There is no documentation about how to make reifications and how is expressed in a SDO_RDF_MATCH query

      Can you help me ?

      Regards

      Isidro
        • 1. Re: How to make reifications and  query to obtain them
          Mannamal-Oracle
          Example: if you want to express the fact that :John :fatherOf :Matt is recorded in the document :birthCertificate, it could be done using reification as follows:

          INSERT INTO family_rdf_data values(100,
          SDO_RDF_TRIPLE_S('family',
          'http://www.example.org/family/stmt1',
          'http://www.w3.org/1999/02/22-rdf-syntax-ns#type',
          'http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement'));

          INSERT INTO family_rdf_data values(101,
          SDO_RDF_TRIPLE_S('family',
          'http://www.example.org/family/stmt1',
          'http://www.w3.org/1999/02/22-rdf-syntax-ns#subject',
          'http://www.example.org/family/John'));

          INSERT INTO family_rdf_data values(102,
          SDO_RDF_TRIPLE_S('family',
          'http://www.example.org/family/stmt1',
          'http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate',
          'http://www.example.org/family/fatherOf'));

          INSERT INTO family_rdf_data values(103,
          SDO_RDF_TRIPLE_S('family',
          'http://www.example.org/family/stmt1',
          'http://www.w3.org/1999/02/22-rdf-syntax-ns#object',
          'http:/www.example.org/family/Matt'));

          INSERT INTO family_rdf_data values(104,
          SDO_RDF_TRIPLE_S('family',
          'http://www.example.org/family/stmt1',
          'http://www.example.org/family/recordedIn',
          'http://www.example.org/family/document/birthCertificate'));

          A sample query involving such reified statements:

          SELECT s, p, o
          FROM TABLE(SDO_RDF_MATCH(
          '(?stmt rdf:subject ?p) (?stmt rdf:predicate :fatherOf)
          (?stmt rdf:object ?o)(?stmt :recordedIn ?s)',
          SDO_RDF_Models('family'),
          null,
          ....