1.10 Cross-Schema Topology Usage and Editing
This topic contains requirements and guidelines for using and editing topologies when multiple database users (schemas) are involved.
Parent topic: Topology Data Model Overview
1.10.1 Cross-Schema Topology Usage
The following considerations apply when one user owns a topology and another user owns a topology geometry layer table. In the following, assume that user A owns the CITY_DATA
topology and that user B owns the CITY_STREETS topology geometry layer table.
-
The owner of the topology must create the topology and initialize the metadata. In this example, user A must perform these actions.
-
Only the owner of a topology can add layers to or delete layers from the topology. Therefore, if you add a table owned by another user to a topology, or when you remove such a table from the topology, you must qualify the table name with the schema name. For example, user A could add the CITY_STREETS table owned by user B to the
CITY_DATA
topology with the following statement:EXECUTE SDO_TOPO.ADD_TOPO_GEOMETRY_LAYER('CITY_DATA', 'B.CITY_STREETS', 'FEATURE', 'LINE');
User A could delete the CITY_STREETS table owned by user B from the
CITY_DATA
topology with the following statement:EXECUTE SDO_TOPO.DELETE_TOPO_GEOMETRY_LAYER('CITY_DATA', 'B.CITY_STREETS', 'FEATURE');
-
The owner of the topology should grant the SELECT or READ privilege on the node, edge, and face information tables to the owner of the topology geometry layer table. For example, user A should grant the SELECT privilege on the CITY_DATA_NODE$, CITY_DATA_EDGE$, and CITY_DATA_FACE$ tables to user B.
-
The owner of the topology geometry layer table should grant the SELECT and INDEX privileges on that table to the owner of the topology. For example, user B should grant the SELECT and INDEX privileges on the CITY_STREETS table to user A.
The owner of the topology geometry layer table should also grant appropriate privileges to other users that need to access the table. For read-only access, grant the SELECT privilege on the table to a user; for read/write access, grant the INSERT, SELECT, and UPDATE privileges.
Parent topic: Cross-Schema Topology Usage and Editing
1.10.2 Cross-Schema Topology Editing
The following considerations apply when one user owns a topology and another user wants to edit the topology. In the following, assume that user A owns the CITY_DATA
topology and that user B wants to edit that topology.
-
The owner of the topology should grant the following privileges to users who can edit the topology: INSERT, SELECT, and UPDATE on the node, edge, face, and relationship information tables, and SELECT on the node, edge, and face sequences used to generate ID numbers for the topology primitives. For example, user A could grant the following privileges to user B, where the table names end with
$
and the sequence names end with_S
:GRANT insert,select,update ON city_data_node$ TO b; GRANT insert,select,update ON city_data_edge$ TO b; GRANT insert,select,update ON city_data_face$ TO b; GRANT insert,select,update ON city_data_relation$ TO b; GRANT select ON city_data_node_s TO b; GRANT select ON city_data_edge_s TO b; GRANT select ON city_data_face_s TO b;
-
When a user who does not own the topology edits that topology, the owner's schema name should be specified with the topology name in functions and procedures that accept the topology name as an input parameter. For example, user B should specify the topology as
A.CITY_DATA
, not justCITY_DATA
.
See Also:
-
Editing Topologies for information about editing topologies.
Parent topic: Cross-Schema Topology Usage and Editing