Explanation of a BLOB and a CLOB

前端 未结 4 587
无人及你
无人及你 2021-02-06 00:57

I am looking for a real good explanation of a BLOB and CLOB data. I am looking for the great of that explains in plain English.

4条回答
  •  自闭症患者
    2021-02-06 01:41

    It's pretty straight forward. The difference is that your storing large data objects within the table as a column that are either character based (i.e. A CLOB) or binary based (i.e. a BLOB) Think of it in the same terms of how you would open a file as text vs when you open it as binary data.

    VARCHARS etc. would still be preferred for string data types that are relatively short and in my mind a singular piece of data. For example a name, a street name, dept name etc. When you're looking to store something along the lines of a XML configuration file or the like, you would want to consider storing it as a CLOB. If you're storing say images, then a BLOB would be the logical choice. There are discussions about whether it's better to store the actual image or config file within the table vs storing a path to the actual file instead but I'll leave that for another question.

提交回复
热议问题