This is mainly just a "check my understanding" type of question. Here's my understanding of CLOBs and BLOBs as they work in Oracle:
So in other words, say I have some binary data (in this case a pickled python object). I need to be assured that when I send it, it will be stored exactly how I sent it and that when I get it back it will be exactly the same. A BLOB is what I want, correct?
Is it really feasible to use a CLOB for this? Or will character encoding cause enough problems that it's not worth it?
The full form of Blob is a Binary Large Object. The full form of Clob is Character Large Object. This is used to store large binary data. This is used to store large textual data.
A BLOB (binary large object) is a varying-length binary string that can be up to 2,147,483,647 characters long.
BLOBs are used to store binary information, such as images, while CLOBs are used to store character information. BLOBs and CLOBs can store up to 4 Gigabytes of data (the limit imposed by the JDBC and ODBC specifications).
CLOB
is encoding and collation sensitive, BLOB
is not.
When you write into a CLOB
using, say, CL8WIN1251
, you write a 0xC0
(which is Cyrillic letter А).
When you read data back using AL16UTF16
, you get back 0x0410
, which is a UTF16
represenation of this letter.
If you were reading from a BLOB
, you would get same 0xC0
back.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With