How is the Strategy File (STG) Structured?

There is an external strategy file (STG) file in XML format for each supported RDBMS. You migrate existing or create new external strategies to this file. All external strategy files use the strategy dtd (<RDBMS>.dtd) file in the following directory:

 

$INSTALLDIR/dataAccess/RDBMS/connectionServer

 

The elements in the external strategy XML file are defined in the external strategy DTD file. If you are using certain XML editors, for example XML SPY, the available parameters are listed in a drop down list when you create a new strategy element.

The external strategy file contains one main section called Strategies. All the external strategies are defined in this section. The Strategies section has the following elements and parameters:

File element Description
Strategy Main element. All external strategies are created within this element.
Name Name of the external strategy. This name appears in the drop down list on the Strategies page. Default element.
Type

The list that the external strategy appears in on the Strategy page. There are 3 values:

·            JOIN: Join strategy appears in the Joins list.

·            OBJECT: Classes and objects strategy appears in the Classes and Objects list.

·            STRUCT: Table detection strategy appears in the Tables list.

SQL The SQL code for the script. This is the SQL script that Designer runs when the strategy is selected. The SQL script must follow a specific output format for object and join creation, and table detection routines to run correctly. See the section The Output Format of Object Strategies (OBJECT) for information on structuring the SQL for an external strategy.
Connection Specify a database connection. The connection type must be personal
SkipMeasures When set to Y, it skips the screen in the Quick Design wizard that deals with the creation of measures:
File File path of an external text file that contains data organized in a specific output format that creates a universe automatically. See the section Creating a Text File for Data for more information.

Example: Classes and Objects external strategy in oracle.stg

The external strategy file for Oracle is oracle.stg. It is stored in the directory $INSTALLDIR/dataAccess/RDBMS/connectionServer/oracle/oracle.stg. This file contains a number of example external strategies shipped with Designer. You can customize these strategies, or use them as templates for new ones. An external strategy from the oracle.stg file that automatically associates tables with classes, and columns with objects is shown below:

 

Classes_and_Objects_external_strategy_in_oracle.stg