View previous topic :: View next topic
|
Author |
Message |
shweta bansal5
New User
Joined: 02 Aug 2011 Posts: 10 Location: India
|
|
|
|
Hi
In my application, earlier we were dumping 32K bytes of data into a Varchar column.
Now the size of data has increase upto 600K. The column type has been changed to BLOB. Can someone tell me what is the difference between BLOB and CLOB. And why BLOB was preferred over CLOB. Is it something related to the limits or storage space?
Thanks,
Shweta |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
shweta bansal5
New User
Joined: 02 Aug 2011 Posts: 10 Location: India
|
|
|
|
Thanks for the reply, Anuj.
I read the document. Its a good information about CLOB and BLOB. But my question is why did we prefer BLOB to CLOB. And the data to be dumped in the column is actually character data. So we could use CLOB as well.
Do you know if BLOB takes some less storage or there is some other advantage over CLOB. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Shweta,
Basically,
BLOB is used for storing binary objects, JPG, mp3's or AVI's.
CLOB is used for storing character large objects, very big XML sort of files.
Quote: |
the data to be dumped in the column is actually character data. So we could use CLOB as well. |
Yes, I agree, but need to talk with the DBA or someone in the team to know, Why ? they have decided to go that way.
Can you tell what data does the column is used to store.
Thanks,
Sushanth |
|
Back to top |
|
|
shweta bansal5
New User
Joined: 02 Aug 2011 Posts: 10 Location: India
|
|
|
|
Hi Sushanth,
we are using that column for storing 600K bytes of data, which is defined in a copybook and can have numeric, characters and any comp fields. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi Shweta,
Internally, CLOB is varying-character string and BLOB is a varying-binary string.
The benefit of storing it in a CLOB, you can query(SELECT) the data and see what's inside it, if required for any purposes and when stored in a BLOB, i don't think you can read it so easily, since its considered as a binary.
Also, i don't think there will be any storage differences of storing the same data in CLOB and BLOB.
Note:-
I cannot confirm the statement about selecting BLOB data, since i don't have any BLOB columns with data.
Thanks,
Sushanth |
|
Back to top |
|
|
|