store binary data in db2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TP

    store binary data in db2

    Hi,

    I have a requirement that wants me to store binary data such as word,
    ppt, jpg, gif etc documents in db2. I wonder how developers normally
    store this kind of data in db2.

    1. I guess one way is to store the document directly in db2 as a
    binary clob?
    2. The other way could be to store the link to the file in db2?

    What are the other ways of doing this and the advantages and
    disadvantages of such. My system will be aimed at more high
    performance than anything else.

    Thanks for you r comments.

    tP.
  • Serge Rielau

    #2
    Re: store binary data in db2

    TP,

    You pretty much summed it up. Except that you would use BLOB (rather
    than CLOB). If the doc isn't that big you coudl also use VARCHAR FOR BIT
    DATA.

    To link to a file look at DATALINKs

    Cheers
    Serge
    --
    Serge Rielau
    DB2 SQL Compiler Development
    IBM Toronto Lab

    Comment

    • Anton Versteeg

      #3
      Re: store binary data in db2

      Perhaps DB2 Content Manager can be of help?


      TP wrote:
      [color=blue]
      >Hi,
      >
      >I have a requirement that wants me to store binary data such as word,
      >ppt, jpg, gif etc documents in db2. I wonder how developers normally
      >store this kind of data in db2.
      >
      >1. I guess one way is to store the document directly in db2 as a
      >binary clob?
      >2. The other way could be to store the link to the file in db2?
      >
      >What are the other ways of doing this and the advantages and
      >disadvantage s of such. My system will be aimed at more high
      >performance than anything else.
      >
      >Thanks for you r comments.
      >
      >tP.
      >
      >[/color]

      --
      Anton Versteeg
      IBM Certified DB2 Specialist
      IBM Netherlands


      Comment

      • TP

        #4
        Re: store binary data in db2

        What are the pros and cons of doing either?

        Serge Rielau <srielau@ca.e ye-be-em.com> wrote in message news:<c0qner$pq 7$1@hanover.tor olab.ibm.com>.. .[color=blue]
        > TP,
        >
        > You pretty much summed it up. Except that you would use BLOB (rather
        > than CLOB). If the doc isn't that big you coudl also use VARCHAR FOR BIT
        > DATA.
        >
        > To link to a file look at DATALINKs
        >
        > Cheers
        > Serge[/color]

        Comment

        • Serge Rielau

          #5
          Re: store binary data in db2

          A datalink allows you to access the data outside the DBMS.
          (Who may or may not choose to have DB2 do access control or backup).
          Keeping a BLOB in the DBMS makes it a DBMS object.

          Cheers
          Serge

          --
          Serge Rielau
          DB2 SQL Compiler Development
          IBM Toronto Lab

          Comment

          Working...