Nodechart Reference Manual (v1.0.0)

System Requirements

The system requirements for Nodechart are;
  • Oracle RDBMS version 10 release 2, minimum 15Mb free space
  • OracleAS or OHS
  • The following SVG 1.1 enabled browsers;
    • Firefox 1.5 or 2.0,
    • Opera 9.10,
    • IE 7 with Adobe SVG viewer (v3 or v6)

[Top]

Installation Instructions

The Nodechart application may be either installed directly into the same schema used for your network NODE and LINK tables or into a separate schema. The distribution file contains four SQL scripts, namely; install.sql, upgrade.sql, load_icons.sql and deinstall.sql.

install.sql Creates all Nodechart objects in the current schema. This script should be run for an initial install.
load_icons.sql Loads a set of charting icons into the database. This script should be run as part of an initial install or subsequently if you have received an updated set of icons.
upgrade.sql Upgrades the Nodechart application to the current version. Should only be run if upgrading from one version of Nodechart to another.
deinstall.sql Removes all Nodechart objects, including any user charts, from the current schema. Should only be run to remove the entire Nodechart application from the database.

For an initial install only the install.sql and load_icons.sql scripts need to be run. For example:

Step 1. Creating a new separate schema (optional):

    SQL> connect system
    SQL> create user <nodechart schema> identified by <nodechart schema password>;
    SQL> grant connect, resource to <nodechart schema>;
    SQL> connect <nodechart schema>
  

Step 2. Run installation scripts:

    SQL> @install.sql
    SQL> @load_icons.sql
  
To finish the installation at least one logical network will need to be defined (see
NODECHART_NETWORK_METADATA section) and an Oracle Application Server DAD will need to be configured (see DAD Configuration) to serve the application.

The Nodechart application consists of several database objects (tables, indexes, types and packages) all of which are prefixed with "NODECHART_". Significant database objects are discussed throughout this document. Other objects that are not mentioned in this document should not be altered, or have DML applied, in any way.

[Top]

Privileges

If the Nodechart application has been installed into a separate schema (to your network NODE and LINK tables) then suitable "select" privileges may need to be granted to the nodechart schema in order to access the NODE and LINK data. Nodechart packages run as definers rights. It is not recommended to install Nodechart into the SYS or SYSTEM schemas.

Example:

   grant select on my_nodes to <nodechart schema>;
   grant select on my_links to <nodechart schema>;
  

[Top]

NODECHART_NETWORK_METADATA

This table houses the logical network definitions that the Nodechart application will utilize. A row is required to be inserted into the NODECHART_NETWORK_METADATA table for each network definition. There is a minimum set of columns that must be populated for each row in this table in order to be able to correctly define a logical network such as; the NETWORK_ID, NETWORK (name), some NODE table definitions and some LINK table definitions.

Where possible, a similar approach has been adopted to the Oracle SDO_NET XXX_SDO_NETWORK_METADATA views that contain network definitions for the SDO_NET network model. However, whilst similar, the NODECHART_NETWORK_METADATA is actually independent of the Oracle SDO_NET framework. This means it can be used either in conjunction, or separate to, the SDO_NET framework. For example, entries in the NODECHART_NETWORK_METADATA may be used to reference NODE and LINK tables that form part of an SDO_NET logical network. Or, alternatively, they may reference NODE and LINK tables that are outside of the SDO_NET framework. The Nodechart application can be used to explore non-logical SDO-NET networks but the geometric aspects of such networks will be ignored in this case. As another example, it may be desirable to create multiple Nodechart networks representing the same overall SDO_NET logical network but each at different hierarchical levels.

The following describes the NODECHART_NETWORK_METADATA table.

Column Nullable Description
NETWORK_ID NOT NULL A unique arbitrary numeric identifier. Primary Key.
NETWORK NOT NULL An arbitrary name assigned to the network. Used as the display name of the network.
SCHEMA* The database schema that the NODE and LINK tables reside.
NODE_TABLE_NAME* NOT NULL The name of the network NODE table (or view).
NODE_ID_COLUMN* NOT NULL The name of the column in the NODE table that uniquely identifies the node. The underlying column datatype (in the NODE table) must be INTEGER.
NODE_NAME_COLUMN* NOT NULL The name of the column in the NODE table that represents the name of the node. Will be used as the chart node label. The underlying column datatype (in the NODE table) must be either VARCHAR2 or NVARCHAR2.
NODE_TYPE_COLUMN* The name of a column in the NODE table that represents a user defined type of the node. The underlying column datatype (in the NODE table) must be VARCHAR2.
NODE_COST_COLUMN* The name of a column in the NODE table that represents a user defined cost of the node. The underlying column datatype (in the NODE table) must be NUMBER.
NODE_ANNOTATION_EXPR* The name of a column, or an SQL expression (of columns), of the NODE table that will be used as a mouse over tooltip. The datatype returned by the expression must be either VARCHAR2 or NVARCHAR2.
NODE_ICON_EXPR* The name of a column, or an SQL expression (of columns), of the NODE table that will be used to determine the charting icon to be used for the node. The way in which this value is interpreted is dependent upon the NODE_ICON_EXPR_TYPE. The datatype returned by the expression must be VARCHAR2.
NODE_ICON_EXPR_TYPE Specifies how the data returned by the NODE_ICON_EXPR is to be interpreted in respect to what is to be displayed for the node icon. Valid values are; NULL, 'NAME', 'KEYWORDS', 'URL' or 'NODE_TYPE'.
NULL No icon. Instead the node name itself (NODE_NAME_COLUMN) will be the node.
'NAME' Interpret NODE_ICON_EXPR as a NAME of the supplied icon set (see help page icon legend). Facilitates exact matching based on the icon name.
'KEYWORDS' Interpret NODE_ICON_EXPR as space separated KEYWORDS of the supplied icon set (see help page icon legend). Facilitates flexible matching based on icon keywords.
'URL' Interpret NODE_ICON_EXPR as a URL of the icon (eg; .gif, .jpg or .png). This URL needs to be accessible by the client. Note that security measures in some browsers require images to be served from the same host as the application.
'NODE_TYPE' Ignore NODE_ICON_EXPR and use the value of the NODE_TYPE_COLUMN as KEYWORDS of the supplied icon set (see help page icon legend).
The NAME and KEYWORDS used in the supplied icon set may vary between subsequent releases of Nodechart.
NODE_SEARCH_NAME_INDEXTYPE Specifies the type of index that is available on the NODE_NAME_COLUMN (of the underlying NODE table). This will be utilized as a search operator by the "Add Node" screen. Valid values are; NULL, 'NORMAL', 'CTXCAT' or 'CONTEXT".
NULL or 'NORMAL' Indicates that either no, or a normal, index exists on the NODE_NAME_COLUMN
'CTXCAT' Indicates a ctxsys.ctxcat index is available on the NODE_NAME_COLUMN of the underlying NODE table.
'CONTEXT' Indicates a ctxsys.context index is available on the NODE_NAME_COLUMN of the underlying NODE table.
Note that indexes themselves (on the underlying NODE table) are not automatically created by Nodechart. These need to be created separately - see the Network Indexes section. If an appropriate index doesn't exist then charting application errors may occur at runtime.
NODE_SEARCH_ORDER_BY_EXPR* The name of a column, or an SQL expression (of columns), of the NODE table that will be used with an SQL "order by" clause for the "Add Node" screen search results page. By default, no sorting takes place and results are returned as first rows.
NODE_TITLE Reserved for future use.
LINK_TABLE_NAME* NOT NULL The name of the network LINK table (or view).
LINK_ID_COLUMN* NOT NULL The name of the column in the LINK table that uniquely identifies the link. The underlying column datatype (in the LINK table) must be INTEGER.
LINK_START_NODE_ID_COLUMN* NOT NULL The name of the column in the LINK table that identifies the starting node.
LINK_END_NODE_ID_COLUMN* NOT NULL The name of the column in the LINK table that identifies the ending node.
LINK_NAME_COLUMN* The name of a column in the LINK table that represents the name of the link. Will be used as the chart link label (unless multiple links exists between the same nodes). The underlying column datatype (in the LINK table) must be either VARCHAR2 or NVARCHAR2. If LINK_NAME_COLUMN is not specified then the link count will be displayed on the chart links.
LINK_TYPE_COLUMN* The name of a column in the LINK table that represents a user defined type of the link. The underlying column datatype (in the LINK table) must be VARCHAR2.
LINK_COST_COLUMN* The name of a column in the LINK table that represents a user defined cost of the link. The underlying column datatype (in the LINK table) must be NUMBER.
LINK_ANNOTATION_EXPR* The name of a column, or an SQL expression (of columns), of the LINK table that will be used as a mouse over tooltip. The datatype returned by the expression must be either VARCHAR2 or NVARCHAR2. In the chart itself, a maximum of 20 link annotations will be shown between any two given nodes.
LINK_DIRECTION Specifies link direction. Valid values are; 'DIRECTED' or 'UNDIRECTED'.
LINK_TITLE Reserved for future use.
MENU_OPT_JS_URL Reserved for future use.
MENU_OPT_CHART_LABELS Reserved for future use.
MENU_OPT_NODE_LABELS Reserved for future use.
MENU_OPT_TEMP_LINK_LABELS Reserved for future use.
EXTENDED_SETTINGS Reserved for future use.
* - This value will be passed as-is (unparsed) to SQL. Definitions that are invalid or syntactically incorrect are likely to cause charting Application errors.

Example (defining a basic network):

    insert into NODECHART_NETWORK_METADATA(network_id, 
                                           network, 
                                           node_table_name, 
                                           node_id_column, 
                                           node_name_column, 
                                           link_table_name,
                                           link_id_column, 
                                           link_start_node_id_column, 
                                           link_end_node_id_column,
                                           link_direction)
                                   values (1,
                                           'Network 1',
                                           'my_nodes',
                                           'node_id', 
                                           'node_name', 
                                           'my_links',
                                           'link_id',
                                           'start_node_id',
                                           'end_node_id',
                                           'DIRECTED');
  
Example (configuring node icons based on my_nodes.node_type keywords):
    update NODECHART_NETWORK_METADATA 
    set NODE_TYPE_COLUMN = 'node_type',
        NODE_ICON_EXPR_TYPE = 'NODE_TYPE'
    where NETWORK_ID = 1;
  
Example (configuring node icons based on a column my_nodes.node_keywords):
    update NODECHART_NETWORK_METADATA 
    set NODE_ICON_EXPR = 'node_keywords',
        NODE_ICON_EXPR_TYPE = 'KEYWORDS'
    where NETWORK_ID = 1;
  
Example (configuring a node search ctxcat index):
    update NODECHART_NETWORK_METADATA 
    set NODE_SEARCH_NAME_INDEXTYPE = 'CTXCAT'
    where NETWORK_ID = 1;

    create index xyz 
    on my_nodes(node_name)
    indextype is ctxsys.ctxcat;
  

[Top]

NODECHART_PARAMETER (global parameters)

The NODECHART_PARAMETER table houses a set of name/value scalar parameters that affect the behaviour of the Nodechart application which is independent of the defined networks. These are referred to as "global parameters". The global parameters can be altered by applying DML (update statements) directly against the NODECHART_PARAMETER table. Many of the parameters have fixed minimum, maximum or acceptable values - specifying values outside of those ranges, or otherwise invalid values, will be ignored.

The following describes the supported global parameters.

Parameter Name Description
annotation_enabled Specifies whether mouse over tooltips (annotations) are to be enabled. Currently, annotation has been noted to cause certain browsers (Firefox 1.5,2.0) to hang. Setting this value to 'N' will disable all charting annotation. This parameter may be desupported in the future. Accepted values: 'Y', 'N'. Initial setting: 'Y'.
default_image_height Specifies the default chart image height in pixel dimensions. Minimum: 100. Maximum: 9999. Initial setting: 600.
default_image_width Specifies the default chart image width in pixel dimensions. Minimum: 200. Maximum: 9999. Initial setting: 800.
default_placement_x Specifies the default x-coordinate placement value in pixel dimensions for new chart nodes if they have no initial placement value. Initial setting: 325.
default_placement_y Specifies the default y-coordinate placement value in pixel dimensions for new chart nodes if they have no initial placement value. Initial setting: 200.
max_charts_per_user Specifies the maximum number of charts each user is permitted. Once the maximum is reached, the chart with the oldest create time will automatically be deleted whenever a new chart is created. Minimum: 10. Maximum: 500. Initial setting: 100.
max_node_search_results Specifies the maximum number of search results that will be displayed in the "Add Node" search result screen. Minimum: 10. Maximum: 150. Initial setting: 100.
max_string_length Specifies the maximum number of characters permitted for node name labels, node annotations, link name labels and link annotations. Larger strings will be truncated to the specified length. Minimum: 20. Maximum: 200. Initial setting: 80.
nls_date_format An NLS_DATE_FORMAT that will be used for formatting of all displayed dates in the Nodechart application. Initial setting: MM/DD/YYYY HH24:MI:SS.

Example (disabling charting annotation):

    update NODECHART_PARAMETER
    set value='N'
    where name='annotation_enabled';
  

[Top]

DAD Configuration

The Nodechart application needs to be served by either the Oracle HTTP Server (OHS) or by the Oracle Application Server (OracleAS). This is achieved by defining a suitable DAD (Database Access Descriptor) in the modplsql dads.conf configuration file on the server.

To be compatible with the Nodechart application, the DAD needs to have the following characteristics;

  1. PlsqlDatabaseUser reference the schema in which Nodechart has been installed,
  2. PlsqlAuthenticationMode set to either; Basic, SingleSignon, GlobalOwa or CustomOwa (PerPackageOwa is not supported), and
  3. PlsqlDefaultPage set to "nodechart.listCharts"
Basic authentication will require a valid database userid/password and is a common choice of authentication for Oracle Application Server DADs. Use multiple "Location" tags if it is necessary to serve multiple instances of Nodechart (eg, if Nodechart has been installed into multiple schemas within the one database).

The following is an example of a dads.conf configuration file entry where; 1) the URL service path is "/nodechart", 2) the schema in which Nodechart is installed is "nodechart_schema" and 3) the database TNS alias is called MY_DB;

Example:

    edit <OracleASHome>/Apache/Apache/modplsql/conf/dads.conf

    <Location /nodechart>
     SetHandler pls_handler
     Order deny, allow
     Allow from all
     AllowOverride None
     PlsqlDatabaseUsername nodechart_schema
     PlsqlConnectString MY_DB
     PlsqlAuthenticationMode Basic
     PlsqlDefaultPage nodechart.listCharts
    </Location>
   
After restarting the Application Server, the Nodechart application should be accessible from a browser using the following URL;
    http://<host>:<port>/nodechart/
  

Note: Do not change the DAD PlsqlTransferMode parameter from its default setting of "Char". Changing this from "Char" may introduce problems. Nodechart supports UTF8 character sets and will perform appropriate character escaping where necessary.

[Top]

Application Integration

Continuing from the previous section, there are multiple public procedures of Nodechart (URL's) that can be used to directly access different components of the Nodechart application from a browser. These are;
  • nodechart.listCharts
  • nodechart.newChart
  • nodechart.img
These URL's may be useful to assist integrating Nodechart into an existing application. Methods to facilitate returning from Nodechart back to existing applications will be catered for in future releases.

nodechart.listCharts
Parameters: NONE
This is the primary entry point for users to the Nodechart application. The displayed page will list current charts and allow users to access charts, delete charts and access chart settings. There are no parameters for this procedure.

Example:

    http://<host>:<port>/<location>/nodechart.listCharts
  
nodechart.newChart
Parameters: NETWORK_ID, CHART_TITLE, NODE_ID*, DISPERSE+
This procedure requires a valid NETWORK_ID (see NODECHART_NETWORK_METADATA) as a minimum and will place the user directly in a new chart window. An optional text CHART_TITLE may be specified. Optional, and multiple, NODE_ID's may be passed to add to the chart so the initial chart is not empty. Here the NODE_ID parameter values should be populated with actual values from the underlying network NODE table (NODE_ID is used as a generic parameter name for this procedure). If valid NODE_ID's are passed, they will initially be placed at an overlapping default location (all in the same place). If the LAYOUT parameter is passed, and is set to 'disperse', then the initial nodes will be radially dispersed from the default placement location ('disperse' is the only supported LAYOUT in this version).

Example (empty chart):

    http://<host>:<port>/<location>/nodechart.newChart?NETWORK_ID=1
  

Example (single node):

    http://<host>:<port>/<location>/nodechart.newChart?NETWORK_ID=1&NODE_ID=123
  

Example (multiple nodes):

    http://<host>:<port>/<location>/nodechart.newChart?NETWORK_ID=1&NODE_ID=123&NODE_ID=456&LAYOUT=disperse
  

nodechart.img
Parameters: NAME, KEYWORDS
This procedure retrieves an icon from the loaded icon set based on either the icon NAME or icon KEYWORDS text parameters. The NAME parameter provides exact matching, whereas the KEYWORDS parameters provides flexible matching. In the case where a match is not found, a default charting icon will be returned. This procedure does not normally need to be explicitly invoked except in the case to permit a mixture of supplied chart icons and your own node images. See section
Combining Icons and Images for more detail.

Example:

    http://<host>:<port>/<location>/nodechart.img?NAME=person
  

[Top]

Combining Icons and Images

Combining your own node images with the supplied node icons can be achieved by defining the chart metadata NODECHART_NETWORK_METADATA.NODE_ICON_EXPR_TYPE to 'URL'. For your own images, you will supply the URL expression based on your nodes (as per NODECHART_NETWORK_METADATA.NODE_ICON_EXPR). For nodes that will use the supplied icons, the URL expression could be either 'nodechart.img?NAME=<expr>' or 'nodechart.img?KEYWORDS=<expr>'. Where <expr> would be derived from the node itself to result in a meaningful icon (the following example is based on my_nodes.node_keywords).

For example:

    insert into NODECHART_NETWORK_METADATA(....,
                                           NODE_ICON_EXPR,
                                           NODE_ICON_EXPR_TYPE,
                                           ....)
                                   values (....,
                                           'get_image_url(node_id)',
                                           'URL',
                                           ....);

    create function get_image_url(pNODE_ID in NUMBER) return VARCHAR2
    as
     vNODE_KEYWORDS	VARCHAR2(200 CHAR);
    begin
     select node_keywords
     into vNODE_KEYWORDS
     from my_nodes
     where node_id = pNODE_ID;
     if <My Image>
      then
       return 'some_url_to_my_image'
      else
       return 'nodechart.img?KEYWORDS='||vNODE_KEYWORDS;
      end if;
    end;
  

[Top]

Network Indexes

Performance of the Nodechart application can be optimized by creating appropriate conventional indexes on the network NODE and LINK tables (Oracle SDO_NET indexes are not necessary). The following table lists suggested indexes. This list is divided into three categories; mandatory (M), recommended (R) and alternative (A). Mandatory indexes must exist or charting runtime errors may occur - and the only truly mandatory indexes are primary key or unique indexes on the NODE and LINK tables. Recommended indexes are suggestions to improve runtime performance and alternative indexes may be suitable dependent upon user usage patterns.

The Nodechart application does not automatically create these indexes on the network NODE and LINK tables. Such indexes would need to be created manually and the tables should be analyzed to collect statistics.

Table Column(s) Cat Description
NODE_TABLE_NAME NODE_ID_COLUMN M Either defined as primary key, or this field must have a unique index. Eg;
alter table my_nodes(node_id primary key);
NODE_TABLE_NAME NODE_NAME_COLUMN R The "Add Node" search screen may significantly benefit by having a ctxsys.ctxcat or ctxsys.context index on this field. Note that the NODECHART_NETWORK_METADATA. NODE_SEARCH_NAME_INDEXTYPE also needs to be updated to make use of any such indexes. For example;
update NODECHART_NETWORK_METADATA
set NODE_SEARCH_NAME_INDEXTYPE = 'CTXCAT'
where NETWORK_ID = <My Network>;

create index xyz 
on my_nodes(node_name) 
indextype is ctxsys.ctxcat;
Note NVARCHAR2 columns, or Node table definitions based on database views, may not support such domain indexes.
NODE_TABLE_NAME NODE_TYPE_COLUMN R If defined, charting performance may benefit by having a non-unique index on the node type column. Eg;
create index xyz on my_nodes(node_type);
NODE_TABLE_NAME NODE_COST_COLUMN R If defined, charting performance may benefit by having a non-unique index on the node cost column. Eg;
create index xyz on my_nodes(node_cost);
NODE_TABLE_NAME NODE_ID_COLUMN, NODE_TYPE_COLUMN, NODE_COST_COLUMN A Depending on user usage patterns (for example; whether node expansion filters are being used), charting performance may benefit from a composite index on the node table. Eg;
create index xyz 
on my_nodes(node_id, node_type, node_cost);
LINK_TABLE_NAME LINK_ID_COLUMN M Either defined as primary key, or this field must have a unique index. Eg;
alter table my_links(link_id primary key);
LINK_TABLE_NAME LINK_START_NODE_ID_COLUMN, LINK_END_NODE_ID_COLUMN R A composite index on these two fields is recommended. Eg;
create index xyz 
on my_links(start_node_id, end_node_id);
LINK_TABLE_NAME LINK_TYPE_COLUMN R If defined, charting performance may benefit by having a non-unique index on the link type column. Eg;
create index xyz on my_links(link_type);
LINK_TABLE_NAME LINK_COST_COLUMN R If defined, charting performance may benefit by having a non-unique index on the link cost column. Eg;
create index xyz on my_links(link_cost);
LINK_TABLE_NAME LINK_ID_COLUMN, LINK_TYPE_COLUMN, LINK_COST_COLUMN A Depending on user usage patterns (for example; whether link expansion filters are being used), charting performance may benefit from a composite index on the link table. Eg;
create index xyz 
on my_links(link_id, link_type, link_cost);

[Top]

Application Error Codes

Following is a list of the possible charting application error codes and descriptions that may be generated during runtime;

Error Cause Action/Description
-20020 no networks defined No networks are defined in NODECHART_NETWORK_METADATA.
-20050 chart does not exist The chart identifier (CHART_ID) was either not specified or was invalid.
-20060 network does not exist The network identifier (NETWORK_ID) was either not specified or was invalid.
-20070 chart and/or network does not exist Either the network identifier (NETWORK_ID) and/or chart identifier (CHART_ID) were not specified or were invalid.
-20100 network node table error An SQL error was encountered when trying to access the network node table. Check the node table entry, node table column entries, and possibly schema entry in the NODECHART_NETWORK_METADATA table. Refer to any additional error messages.
-20110 network link table error An SQL error was encountered when trying to access the network link table. Check the link table entry, link table column entries, and possibly schema entry in the NODECHART_NETWORK_METADATA table. Refer to any additional error messages.
-20120 network node and/or link table error An SQL error was encountered when trying to simultaneously access the network node and link tables. Refer to error codes -20100 and -20110 for further descriptions.

[Top]

Known Issues

Following is a list of known issues with the current release;

Browser Issue Workaround
Firefox 1.5, 2.0 Browser may hang (become unresponsive) with high CPU and high memory utilization when chart annotations are being used. Disable charting annotations by setting global parameter annotation_enabled to 'N'
Chart status remain "processing" after adding new nodes. New nodes are not displayed after "Add Node" window closes. Manually refresh chart, or reload page, after adding new nodes.
Opera 9.10 Zoom in, Zoom out and Navigate affect the entire chart image. That is, the status box, chart menus and annotations are affected. No current Workaround. Do not use Zoom or Navigate functions in Opera.
IE7 + ASV3 The "actual size" chart image setting may be ignored for .png images No current workaround
IE7 + ASV6 The "actual size" chart image setting may be ignored for .png images No current workaround
IE7 + Corel SVG Viewer Not supported.

[Top]


© 2007 Nodechart
Oracle is a trademark of the Oracle Corporation