6 Replies Latest reply on Apr 21, 2010 11:05 PM by 24743

    BLOB data

    24743
      Hi

      Is there a recommended way to handle BLOB data?

      Regards - Christian
        • 1. Re: BLOB data
          alwu-Oracle
          Hi,

          I guess it depends on a few things.

          1) do you have lots of BLOB data?

          2) do you want to store the BLOB data as long literal in triple's object positions?

          3) can the BLOB data stored in a separate table and we somehow reference them in the triple data?

          Thanks,

          Zhe Wu
          • 2. Re: BLOB data
            24743
            Hi

            Yes we have lot's of BLOB data - and it would be "nice" to be able to store this in the object position like it's possibel to store CLOB data.

            Regards - Christian
            • 3. Re: BLOB data
              alwu-Oracle
              If you really need to store those BLOB data "in" the triples, you need to convert the data into a form that complies with NTriple EBNF (please refer to Section 3.1 of http://www.w3.org/TR/rdf-testcases/#ntrip_grammar)

              If there is no such hard requirements, you may want to store them separately and use a reference in the triple object field. You may be able to leverage Oracle Database 11g SecureFiles feature.

              Thanks,

              Zhe Wu
              • 4. Re: BLOB data
                24743
                Virtuoso (OpenLink) seems to have an RDF_BOX type for that kind of data (1); maybe Oracle could use BLOB and Lob locators.

                1: http://docs.openlinksw.com/virtuoso/rdfdatarepresentation.html#rdfboxtype

                Regards - Christian
                • 5. Re: BLOB data
                  alwu-Oracle
                  Hi,

                  Thanks for the pointer.

                  We are constantly collecting requirements from our customers. Please let us know the following.
                  How do you want to use those BLOB data? Do you need to query those BLOB data from SPARQL? Or it is ok to process lob
                  locators from your applications?

                  Right now, you can use Jena Adapter to insert triples with long literals (you can convert BLOB into a string form and let Jena Adapter deal with escaping). SQL insert statement is another way.

                  Cheers,

                  Zhe Wu
                  • 6. Re: BLOB data
                    24743
                    Today our binary data is stored in BLOB columns, indexed with Oracle Text, and queried with the "contains" operator. I don't know if Oracle Text can be user with RDF and sem_match - but that would probably be the way I would like to go (we don't use Jena).

                    Regards Christian