473,385 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

store binary data in db2

TP
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.
Nov 12 '05 #1
4 5758
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
Nov 12 '05 #2
Perhaps DB2 Content Manager can be of help?
TP wrote:
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.


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands
Nov 12 '05 #3
TP
What are the pros and cons of doing either?

Serge Rielau <sr*****@ca.eye-be-em.com> wrote in message news:<c0**********@hanover.torolab.ibm.com>...
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

Nov 12 '05 #4
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
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PearCZ | last post by:
Hi, I am trying to store binary data (e. g. image) in MS SQL Server 2000 column which data type is . I understand I could store binary data easily in MS SQL type but I have only column...
1
by: Niko Korhonen | last post by:
I'm currently in the process of programming a multimedia tagging library in standard C++. However, I've stumbled across one or two unclear issues while working with the library. First of all, is...
4
by: Wolfgang Kaml | last post by:
I came accross the need to store binary data in the registry. The binary data to be saved is kept within a string in the code segment. If I write that string to a registry, not all of the data is...
8
by: Mark | last post by:
Hello. I am attempting to write binary data from a file to an OLE Object field, and then write the file back out from the database. I am reading and writing the files in binary mode, and using...
2
by: Edvin | last post by:
Why is binary array written to a file different than when converting the binary array to string and then writing it to file! For example: // --- Allocate byte array byte arrByte = new byte;...
7
by: Rudi Menter | last post by:
Hi, I would like to store binary data (as data-type blob) in a (MySql-) database, so I require functionality that allows a mapping from and back into the filesystem. Now, is there a library for...
0
by: dcruncher4 | last post by:
DBI 1.48 DBD Driver for DB2 UDB: 0.78 DB2 8.2.3 Perl 5.8.3 we store binary data in char field in db2 tables. Will there be a problem when fetching it via fetchrow_hashref(). Are there known...
0
by: RN | last post by:
Hi everyone, First please let me explain. I am attempting to store pdf files in an MS Access DB (2000) and I have written a subroutine to do this. My code seems to work perfectly (see code...
4
by: Dmitry Teslenko | last post by:
Hello! I have some postgresql database that stores binary data (windows/linux executables). Field type I use for this is bytea. Also I have php script that allows users download these binaries via...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.