2 Replies Latest reply on Nov 16, 2010 9:11 PM by 804791

    Maximum Size of bind variables/model names in a SPARQL query

    804791
      I was wondering what the maximum field size is for a bind variable (?'' being used in the subject or object within a triple) in a SPARQL query using the Jena Adapter for Oracle? The reason for this is that I keep getting Oracle exception (ORA-00972: identifier is too long) when executing queries.

      The other question dealt with the max size of the model names? Is there anyway to increase this length by extending certain classes within the Jena Adapter for Oracle?

      Thanks,
      Rahul
        • 1. Re: Maximum Size of bind variables/model names in a SPARQL query
          alwu-Oracle
          Hi,

          For model names, because we use model names together with some suffixes to create namespace tables, application tables, and indexes, the length
          has to be shorter than 30 bytes - 11 bytes = 19 bytes.

          Note that 30 bytes limit is imposed by Oracle database. You cannot create a table with a name longer than 30 bytes.
          11 bytes is the maximum suffix length imposed by Jena Adapter. We are considering to reduce it to 4 for the next Jena Adapter release.

          For variable names, because we translate SPARQL to SQL queries (and variable name to column alias), there is the same 30 bytes limit.
          Note that there are suffixes for variable names as well. For example, $RDFVID, $RDFLTYP, ... These suffixes are used internally.

          Some simple tests for illustration purpose.


          SQL> create table a23456789012345678901234567890(i int);
          Table created.


          SQL> create table a234567890123456789012345678901(i int);
          create table a234567890123456789012345678901(i int)
          *
          ERROR at line 1:
          ORA-00972: identifier is too long


          -- Assume table X has a column I
          --
          SQL> select i as "v23456789012345678901234567890" from x;
          no rows selected


          SQL> select i as "v234567890123456789012345678901" from x;
          select i as "v234567890123456789012345678901" from x
          *
          ERROR at line 1:
          ORA-00972: identifier is too long

          Hope it helps,

          Zhe Wu