6 Replies Latest reply on Jul 2, 2007 6:57 PM by Mannamal-Oracle

    How to remove triple?

    556961
      can someone tell me, how to remove a triple? there is SDO_RDF-Procedure?
        • 1. Re: How to remove triple?
          Mannamal-Oracle
          By performing the delete operation on the application table.

          Using the example in the documentation, a triple could be deleted as follows:

          -- all triples with a specific subject will be deleted
          delete from family_rdf_data a
          where a.triple.get_subject()='<http://www.example.org/family/Janice>';

          -- only a specific triple is deleted (subject, property, object are all specified)
          delete from family_rdf_data a
          where a.triple.get_subject()='<http://www.example.org/family/John>' and
          a.triple.get_property() = '<http://www.example.org/family/fatherOf>' and
          to_char(a.triple.get_object()) = '<http://www.example.org/family/Suzie>';

          These operations will be faster if indexes are built on application table, for example:

          create index family_sub_idx on family_rdf_data(triple.get_subject());
          create index family_prop_idx on family_rdf_data(triple.get_property());
          create index family_obj_idx on family_rdf_data(to_char(triple.get_object()));

          Melli
          • 2. Re: How to remove triple?
            556961
            thank you very much! this must help me enough :)
            • 3. Re: How to remove triple?
              24743
              With blank nodes as objects, this way to delete could be like deleting the master without the details. Is there a more "semantic" delete (and update) planned?

              Regards - Christian
              • 4. Re: How to remove triple?
                Mannamal-Oracle
                Could you elaborate more on what you mean by a "semantic" update/delete?

                Melli
                • 5. Re: How to remove triple?
                  24743
                  Since we don't have foreign keys, the system has to know (~semantic) than with these triplets

                  <URI> person :_bn1
                  :_bn1 name xxxx
                  :_bn1 email yyy

                  it should not be possible to delete the first triple without deleting the others.

                  Maybe reification could be a way to "delete" the triplets.

                  ps: I found a small discussion here: http://lists.w3.org/Archives/Public/semantic-web/2005Jun/0186.html

                  Christian
                  • 6. Re: How to remove triple?
                    Mannamal-Oracle
                    Thanks! That is a good example. We will take it as feedback for future releases.

                    Melli