Oracle中的(文本+图像)文件 [英] (text + images ) files in Oracle
问题描述
我正在使用Oracle 10g.
I am using Oracle 10g.
我的Java程序获取了一些具有大量文本内容和图像的文件.我想在Oracle中存储数据(具有带有图像的文本文件).从Oracle DB插入和检索数据的最佳方法是什么.
My Java program gets some files having huge text contents + images. I want to Store Data (having text files with Images) in oracle. What is the best way to to insert and retrieve the data from Oracle DB.
我应该使用BLOB还是CLOBS?
Should i use BLOBs or CLOBS?
我应该使用XML数据类型吗?
Should i use XML data types?
我应该使用Oracle Text数据类型吗?
Should i use Oracle Text datatype?
请提出最佳做法.它非常紧急.
Please suggest the best practice. Its pretty urgent.
推荐答案
如果值可能包含图像等二进制数据,那么BLOB
是您最好的选择.
If the values may include binary data such as images, then BLOB
is your best bet.
如果值仅包含文本,则CLOB
应该没问题.
If the values only contain text, then CLOB
should be fine.
如果值仅包含XML,则可以使用CLOB
或XMLType
-您需要确定哪种方式更适合您的情况-有关更多信息,请参见:
If the values only contain XML, then either CLOB
or XMLType
may be used - you'll need to work out which is better for your situation - more info here: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16659/xdb01int.htm#ADXDB0120
这篇关于Oracle中的(文本+图像)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!