6.10 SDO_NET.CREATE_LOGICAL_NETWORK
Format
SDO_NET.CREATE_LOGICAL_NETWORK( network IN VARCHAR2, no_of_hierarchy_levels IN NUMBER, is_directed IN BOOLEAN, node_with_cost IN BOOLEAN DEFAULT FALSE, is_complex IN BOOLEAN DEFAULT FALSE, storage_parameters IN VARCHAR2 DEFAULT NULL); or SDO_NET.CREATE_LOGICAL_NETWORK( network IN VARCHAR2, no_of_hierarchy_levels IN NUMBER, is_directed IN BOOLEAN, node_table_name IN VARCHAR2, node_cost_column IN VARCHAR2, link_table_name IN VARCHAR2, link_cost_column IN VARCHAR2, path_table_name IN VARCHAR2, path_link_table_name IN VARCHAR2, subpath_table_name IN VARCHAR2, is_complex IN BOOLEAN DEFAULT FALSE, storage_parameters IN VARCHAR2 DEFAULT NULL);
Description
Creates a logical network, creates all necessary tables, and updates the network metadata.
Parameters
- network
-
Network name.
- no_of_hierarchy_levels
-
Number of hierarchy levels for links in the network. (For an explanation of network hierarchy, see Network Hierarchy.)
- is_directed
-
A Boolean value.
TRUE
indicates that the links are directed;FALSE
indicates that the links are undirected (not directed). - node_with_cost
-
A Boolean value.
TRUE
causes a column named COST to be included in the <network-name>_NODE$ table;FALSE
(the default) causes a column named COST not to be included in the <network-name>_NODE$ table. - node_table_name
-
Name of the node table to be created. (The node table is explained in Node Table.) If you use the format that does not specify this parameter, a node table named <network-name>_NODE$ is created.
- node_cost_column
-
Name of the cost column in the node table. (The node table is explained in Node Table.) If you use the format that does not specify this parameter, the geometry column is named COST.
- link_table_name
-
Name of the link table to be created. (The link table is explained in Link Table.) If you use the format that does not specify this parameter, a link table named <network-name>_LINK$ is created.
- link_cost_column
-
Name of the cost column in the link table. (The link table is explained in Link Table.) If you use the format that does not specify this parameter, the geometry column is named COST.
- path_table_name
-
Name of the path table to be created. (The path table is explained in Path Table.) If you use the format that does not specify this parameter, a path table named <network-name>_PATH$ is created.
- path_link_table_name
-
Name of the path-link table to be created. (The path-link table is explained in Path-Link Table.) If you use the format that does not specify this parameter, a path-link table named <network-name>_PLINK$ is created.
- subpath_table_name
-
Name of the subpath table to be created. (The subpath table is explained in Subpath Table.)
- is_complex
-
Reserved for future use. Ignored for the current release.
- storage_parameters
-
Physical storage parameters used internally to create network tables. Must be a valid string for use with the CREATE TABLE statement. For example:
TABLESPACE tbs_3 STORAGE (INITIAL 100K NEXT 200K)
. If you do not specify this parameter, the default physical storage values are used.
Usage Notes
This procedure provides a convenient way to create a logical network when the node, link, and optional related tables do not already exist. The procedure creates the network; creates the node, link, path, and path-link tables for the network; and inserts the appropriate information in the xxx_SDO_NETWORK_METADATA views (described in xxx_SDO_NETWORK_METADATA Views).
An exception is generated if any of the tables to be created already exists.
The procedure has two formats. The simpler format creates the tables using default values for the table name and the cost column name. The other format lets you specify names for the tables and the cost column.
As an alternative to using this procedure, you can create the network as follows: create the tables using the SDO_NET.CREATE_NODE_TABLE, SDO_NET.CREATE_LINK_TABLE, SDO_NET.CREATE_PATH_TABLE, and SDO_NET.CREATE_PATH_LINK_TABLE procedures; and insert the appropriate row in the USER_SDO_NETWORK_METADATA view.
Examples
The following example creates a directed logical network named LOG_NET1
. The example creates the LOG_NET1_NODE$, LOG_NET1_LINK$,LOG_NET1_PATH$, and LOG_NET1_PLINK$ tables, and updates the xxx_SDO_NETWORK_METADATA views. Both the node and link tables contain a cost column named COST.
EXECUTE SDO_NET.CREATE_LOGICAL_NETWORK('LOG_NET1', 1, TRUE, TRUE);
Parent topic: SDO_NET Package Subprograms