2 Replies Latest reply on May 28, 2010 2:58 PM by 771415

    Delete triple

    771415
      Hi everyone,

      I want to delete some triples from my database but i don't know how to do it.

      The only way i see is when i know the triple's id.
      Then i do "Delete from mytable a where a.id = 4535"

      If i don't know the id, but only some caracteristics how can i do?
      For example, if i have to delete every triples which have "John" as subject?

      And even if i know the id, there's still a problem : the RDF_LINKS table doesn't update.
        • 1. Re: Delete triple
          715399
          Hi,

          After doing a describe (desc SDO_RDF_TRIPLE_S) you will see the various functions available for the triple object type.

          These include: get_property(), get_subject(), etc., so you could do:

          Delete from mytable a where a.triple_col.get_subject() = '<sub>';

          Regards,
          Vladimir
          1 person found this helpful
          • 2. Re: Delete triple
            771415
            Thanks a lot Vladimir!

            When you do that, does it change the table RDF_LINK?

            And an other question : can you delete triples via SparQL? or do you have to do that via SQL?