Oracle Data Type

文档地址:http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci03typ.htm#LNOCI16268

RAW

The RAW data type is used for binary data or bytestrings that are not to be interpreted by Oracle Database, forexample, to store graphics character sequences. The maximum lengthof a RAW column is 2000 bytes.

When RAW data in an Oracle Database table isconverted to a character string in a program, the data isrepresented in hexadecimal character code. Each byte of theRAW data is returned as two characters that indicatethe value of the byte, from '00' to 'FF'. To input a characterstring in your program to a RAW column in an OracleDatabase table, you must code the data in the character stringusing this hexadecimal code.

You can use the piecewise capabilities provided byOCIDefineByPos(), OCIBindByName(),OCIBindByPos(), OCIStmtGetPieceInfo(),and OCIStmtSetPieceInfo() to perform inserts, updates,or fetches involving RAW (or LONGRAW) columns.

If you are using objects in an Oracle database, you can workwith a special OCIRaw data type using a set ofpredefined OCI functions. See "Raw (OCIRaw)" for more information about this data type.

 

LONG RAW

The LONG RAW data type is similar tothe RAW data type, except that it stores raw data witha length up to 2 gigabytes (2^31-1 bytes).

 

 

BFILE

 

Data Type The BFILE data type enables access to binary file LOBsthat are

stored in file systems outside Oracle Database. A BFILE columnor attribute

stores a BFILE locator, which serves as a pointer to a binaryfile on the

server file system. The locator maintains the directory name andthe filename.

You can change the filename and path of a BFILE withoutaffecting the base

table by using the BFILENAME function. Refer to BFILENAME formore information

on this built-in SQL function.

Binary file LOBs do not participate in transactions and are notrecoverable.

Rather, the underlying operating system provides file integrityand durability.

BFILE data can be up to 264-1 bytes, although your operatingsystem may impose

restrictions on this maximum.

The database administrator must ensure that the external fileexists and that

Oracle processes have operating system read permissions on thefile.

The BFILE data type enables read-only support of large binaryfiles. You cannot

modify or replicate such a file. Oracle provides APIs to accessfile data. The

primary interfaces that you use to access file data are theDBMS_LOB package

and Oracle Call Interface (OCI).

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值