3 Replies Latest reply on Mar 23, 2011 3:38 PM by alwu-Oracle

    Sparql to Sql translation.

    849175
      Hi,

      I know that a SPARQL query in jena is parsed in jena's ARQ, and one or more SEM_MATCH queries are issued. So I am interested is there any functions in jena libraries to translate SPARQL queries to SQL queries, and to give me the result back? Or which set of function from this libraries should i use to make this translations? Or is there any known tool that i can use to conver SPARQL to SQL?
      I was looking through the source code of jena libraries to find the code that makes this translation, but i can't really find where and how it is done.

      Thanks,
      Petar.
        • 1. Re: Sparql to Sql translation.
          alwu-Oracle
          Hi Petar,

          Why do you need to see the underlying SQL(s)?

          Thanks,

          Zhe Wu
          • 2. Re: Sparql to Sql translation.
            849175
            Hi Zhe Wu,

            i need to make some performance measurements, so i need to see the queries that are executed against the database.

            I forgot to tell that I am using Oracle Database 11g. As i read, the last translation of the SPARQL query is done in Jena Adapter, and for the given SPARQL query a SEM_MATCH query is issued. I was looking for the source code of Jena Adapter, but I can't find it.
            So does anybody have a clue how can I take advantage of Jena Adapter function to translate SPARQL query to SEM_MATCH query?

            Thanks.
            • 3. Re: Sparql to Sql translation.
              alwu-Oracle
              Hi,

              A good way to measure SPARQL performance is to do that in your client program. You start a timer before you issue a SPARQL query, stop the timer after you get back all the results. Everything happening behind the scene is, well, internal business.

              Note that in some cases, Jena Adapter translates a SPARQL query to multiple SQL queries and spends time merging the sub query results.

              Btw, Jena Adapter is not open source so you won't find it.

              If you really care about the SQL execution time, then you can do database performance monitoring using EM, AWR, etc.

              Thanks,

              Zhe Wu
              1 person found this helpful