3.12 Using GeoRaster with Workspace Manager and Label Security
Oracle Workspace Manager provides a versioning capability for the raster blocks of a GeoRaster object. Oracle Label Security supports GeoRaster objects with enhanced security at the row level of raster blocks.
To use GeoRaster with Oracle Workspace Manager or Oracle Label Security, you should create a raster data table (RDT) as a relational table for the GeoRaster objects (see Example 3-3). You do not need to define an object view of SDO_RASTER type on the base relational RDT.
Parent topic: GeoRaster Database Creation and Management
3.12.1 Using GeoRaster with Workspace Manager
With Workspace Manager, you can conveniently manage changes to the raster data by saving different raster data versions and making modifications in different workspaces. To use GeoRaster with Workspace Manager, you must use relational raster data tables for raster storage and version-enable these relational raster data tables. For example (general format):
EXECUTE DBMS_WM.EnableVersioning (<rdt_relational_table>, 'VIEW_WO_OVERWRITE');
Note:
You can version-enable only raster data tables. Do not version-enable any GeoRaster tables, where GeoRaster objects are stored, and do not perform any operations that will require a GeoRaster table to be modified while you are in a workspace.
After you version-enable a relational RDT, you can use the subprograms in the DBMS_WM package to manage changes to the raster data. If you need to directly modify a raster block, call the DBMS_WM.copyForUpdate procedure before the operation, as shown in the following example:
declare geor sdo_georaster; cond varchar2(1000); lb blob; r1 raw(1024); amt number; begin r1 := utl_raw.copies(utl_raw.cast_to_raw('0'),1024); select georaster into geor from georaster_table where georid=1; cond := 'rasterId=' || geor.rasterId || ' AND pyramidLevel=0 AND ' || ' bandBlockNumber=0 AND rowBlockNumber=0 AND columnBlockNumber=0'; dbms_wm.copyForUpdate(geor.rasterDataTable, cond); sdo_geor.getRasterBlockLocator(geor, 0, 0, 0, 0, lb, null, 'TRUE'); amt := 1024; dbms_lob.write(lb, amt, 1, r1); end; /
However, if you modify raster data using GeoRaster subprograms, you do not need to call the DBMS_WM.copyForUpdate procedure beforehand.
For information about Workspace Manager, see Oracle Database Workspace Manager Developer's Guide.
3.12.2 Using GeoRaster with Label Security
Oracle Label Security provides row-level access control for sensitive data based on a user's level of security clearance. To use GeoRaster with Label Security, follow these basic steps:
You can load GeoRaster data before or after applying the policy to the tables.
The ALL_SDO_GEOR_SYSDATA view (described in GeoRaster System Data Views (xxx_SDO_GEOR_SYSDATA)) contains system data for all GeoRaster objects accessible by the current user, and accessibility in this case is determined by the user's privileges as defined in the context of discretionary access control (DAC).
After the label for a GeoRaster table row is updated, ensure that the related data labels in the RDT are updated, so that the labels are synchronized.
For information about Label Security, see Oracle Label Security Administrator's Guide.