2 Replies Latest reply on Mar 12, 2007 11:16 PM by Mannamal-Oracle

    Get Triple ID from Table

    502844
      Hello,
      I have a table with the following description

      Name Null? Type
      ----------------------------------------- -------- ----------------------------
      ID NUMBER
      TRIPLE SDO_RDF_TRIPLE_S


      I want to enquire the triple id for every triple.
      I am trying to use the following query,

      SELECT j.triple.GET_RDF_TRIPLE() FROM TABLENAME AS j;

      But I get the following results back

      ERROR at line 1:
      ORA-00904: "J"."TRIPLE"."GET_RDF_TRIPLE": invalid identifier


      Can someone please point out whats wrong in the query???

      Please help me out

      Thanks

      Regards

      Prateek
        • 1. Re: Get Triple ID from Table
          24743
          I had the same problem last week - but not today :-\

          Regards - Christian
          • 2. Re: Get Triple ID from Table
            Mannamal-Oracle
            Hi Prateek,

            There is no method called get_rdf_triple(). However, there is a function called get_triple_id(), and also the object sdo_rdf_triple_s contains a field rdf_t_id which contains the triple id.

            So the two documented ways of getting the triple id are:

            select sdo_rdf.get_triple_id(<model id>,<subject>,<property>,<object>) from dual;
            -- will get you the triple id for the triple stored in the database identified by
            -- <subject>,<property>,<object>

            select t.triple.rdf_t_id from <table_name> t;
            -- Note however, it is not good practice to reach into the object and access an
            -- object attribute, as the object attribute might change in future releases.
            -- For instance, the nature of the triple id is likely to change in a future release.
            -- If you use a method (or a defined function or procedure), then your application
            -- code will not have to change. But the function get_triple_id takes in the
            -- triple components, and that is not what you want I think. In the current
            -- release select t.triple.rdf_t_id will work, and for future releases we will
            -- document a way to do get similar functionality for the new triple_id. Your
            -- code might have to change a bit.

            Why do you and others need to access the triple id? It would be useful for us to understand application scenarios for future design decisions.

            Melli