1 Reply Latest reply on Dec 22, 2006 6:24 PM by Mannamal-Oracle

    How do you query Oracle RDF database using Java program?

      Does anyone know how to get data out of the oracle RDF database using Java?

      I'm running the following java code and it returns basically null values. My guess is that the get_triple() function returns a dataset other than resultset. I've tried searching the Oracle web site. Am I supposed to be using CLOB object? Any help would be appreciated. Thanks

      sql = "SELECT a.triple.GET_TRIPLE() AS triple FROM family_rdf_data a";
      ResultSet rs = stmt.executeQuery( sql ) ;
      while ( rs.next() )
      System.out.println( rs.getString(1) ) ;
      rs.close() ;
        • 1. Re: How do you query Oracle RDF database using Java program?
          get_triple() returns an object, and the code would be different from the code of retrieving a string. Some sample code for retrieving objects is at http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html

          get_subject(), get_property() return strings so the code below should work. get_object() returns a CLOB so different handling would be required and there is some sample code at the link above.