Oracle Data Type

来源:互联网 发布:ps2017cc磨皮软件mac 编辑:程序博客网 时间:2024/06/03 21:15

文档地址: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 aRAW column is 2000 bytes.

See Also:

OracleDatabase SQL Language Reference

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(),andOCIStmtSetPieceInfo() to perform inserts, updates,or fetches involvingRAW (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).

 

原创粉丝点击