Databases Reference
In-Depth Information
11. The results of this step are shown in the following screenshot:
12. Compress the blob field:
ALTER TABLE MyCustomers MODIFY LOB (c_file) (compress high);
13. Test the space occupied by the BLOB data as in step 6.
14. The results of this step are shown in the next screenshot:
How it works...
BLOB fields are used to store binary unstructured data, such as multimedia data, that is,
pictures, video, and audio. We have created a table
MYCUSTOMERS
with the data of the
CUSTOMERS
table in schema
SH
, adding a new BLOB field,
c_file
, to store a binary file
with every customer.
We have instructed the database to store BLOB data
inline
with the row, in a newly created
tablespace
ASSM_TS
whose segment space is set to automatic management.
We have chosen to store the BLOB data as
SECUREFILE
, an option available from Oracle
Database 11
g
R1, which allows us to carry out subsequent steps to optimize BLOB storage.