The general format of a DDML document looks as follows:
Tag | Description |
---|---|
<tables-definition> | Root element of a DDML document. Its children are the main database entities:
|
<table-definition> | Includes the table-level attributes. Its children are the following tags:
If a table is a statistics table, meaning that the type attribute has the value
|
<ddl-definition> | Includes ddl-level attributes. |
<view-definition> | Includes view-level attributes. |
<tables-definition> tag
Root element of the DDML document.
Attribute | Definition |
---|---|
product | Required. Holds the product short name (product shortcut) consisting if two characters that define the product. In this case, three custom-defined products are available:
|
<table-definition> tag
Holds all of the information included in a single table.
Attribute | Definition |
---|---|
name | Required. Holds the table name. |
type | Required. Specifies the table type and can hold one of the following values:
|
pctfree | Optional. Affects only Oracle and is developed as Can have a value between 0 and 99. If the PMDB is a Microsoft SQL Server database, this attribute is transformed to |
pctused | Optional. Affects only Oracle and is developed as PCTUSED pctused . Can have a value between 0 and 99. |
initrans | Optional. Affects only Oracle and is developed as INITRANS initrans . Can have a value between 1 and 255. |
maxtrans | Optional. Affects only Oracle and is developed as MAXTRANS maxtrans . Can have a value between 1 and 255. |
oracle-storage-clause | Optional. Affects only Oracle and is developed as
|
oracle-additional-clause | Optional. Added to support any other Oracle features that cannot be defined in an Oracle storage clause. For example: NOLOGGING |
filterable | Required for statistics tables (type=STATISTICS ). If one or more columns are not relevant or needed in the PMDB, set this attribute to TRUE . If a statistics table is filterable and some columns are specified as not needed in the load or summary control files, these columns are not loaded or summarized. |
The <table-definition>
tag can have the following children:
If a table is a statistics table, meaning that the type attribute has the value STATISTICS
, the following tags can be specified as children of the <table-definition>
tag:
Additional Child | Definition |
---|---|
<summary-hour> | Optional. Instructs to define an hour-level summary table for this table. Used for time slice statistics tables. The name of the summary table is specified by the name attribute (required). The summary table name should follow the naming conventions specified in Naming conventions. |
<summary-day> | Optional. Instructs to define a day-level summary table for this table. The name of the summary table is specified by the name attribute (required). The summary table name should follow the naming conventions specified in Naming conventions. |
<summary-week> | Optional. Instructs to define a week-level summary table for this table. The name of the summary table is specified by the name attribute (required). The summary table name should follow the naming conventions specified in Naming conventions. |
<summary-month> | Optional. Instructs to define a month-level summary table for this table. The name of the summary table is specified by the name attribute (required). The summary table name should follow the naming conventions specified in Naming conventions. |
<column-definition> tag
Holds all the parameters of a column.
Attribute | Definition |
---|---|
name | Required. Holds the column name. The name should follow the naming conventions specified in Naming conventions. |
data-type | Required. Holds the data type of a column:
|
data-length | Required only for the data types listed below. Specifies the column data length:
|
data-scale | Required only for the data type DECIMAL . Specifies the column data scale. |
null | Required. Has the value TRUE if the column is nullable and FALSE if it is not. |
default | Optional. Specifies the column default. Can have the following values:
A constant value that is equal to the column type:
|
type | Required for the column role in columns of statistics tables. Can have the following values:
|
Columns required for statistics tables
If the table is a statistics table, you must include the following columns:
<column-definition name="<table shortcut>_TIMESTAMP" data-type="TIMESTAMP" null="FALSE" type="DATE"/>
<column-definition name="<table shortcut>_MINUTES_COUNT_SUM" data-type="INTEGER" data-length="9" null="FALSE" type="SUM" default="1"/>
<column-definition name="<table shortcut>_PWHG_ID" data-type="INTEGER" data-length="4" null="FALSE" type="IDENTIFIER"/>
<column-definition name="<table shortcut>_PWII_INSTANCE_ID" data-type="INTEGER" data-length="9" null="FALSE" type="IDENTIFIER"/>
<column-definition name="<table shortcut>_RECIEVED_TIMESTAMP" data-type="TIMESTAMP" null="FALSE" default="CURRENT TIMESTAMP" type="DATE"/>
You must replace <table shortcut>
with the four characters that represent the relevant table (see Table Shortcut).
<index-definition> tag
Holds all the parameters for an index definition.
Attribute | Definition |
---|---|
name | Required. Holds the index name. The name should follow the naming conventions specified in Naming conventions. |
unique | Required. Has the value TRUE if the index is unique and FALSE if it is not. |
primary | Required. Has the value
|
clustered | Optional. Has the value
|
mssql-additional-clause | Optional. Only relevant for Microsoft SQL Server. Allows specifying every parameter defined in the "with" section. |
<foreign-key-definition> tag
Holds all the parameters for a foreign-key definition.
Attribute | Definition |
---|---|
name | Required. Holds the foreign key constraint name. The name should follow the naming conventions specified in Naming conventions. |
ref-table | Required for the table name referenced by the foreign key. |
ref-columns | Required. Includes pairs of referencing and referenced columns separated by blanks. |
on-delete | Required. Determines what action is taken if one or more rows in the referencing table point to a row in the referenced table that has been deleted. Can have the following values:
|
on-update | Required. Determines what action is taken if one or more rows in the referencing table point to a row in the referenced table that has been updated. Can have the following values:
|
<ddl-definition> tag
Holds DDL (Data Definition Language) and DML (Data Manipulation Language) statements that can be performed during installation or uninstallation, such as stored procedures.
Attribute | Definition |
---|---|
statement | Required. Defines the DDL statement. |
dbms | Optional. the RDBMS type on which the DDL generates. Must be one of the following:
If left empty (""), the DDL is created on all relational database management systems (RDBMS). |
version | Optional. The RDBMS version on which the DDL generates. Should have the format |
event | Optional. The RDBMS version on which the DDL generates. Must be one of the following:
|
<view-definition> tag
Holds all the parameters required for a view definition.
Attribute | Definition |
---|---|
name | Required. Holds the view name. The name should follow the naming conventions specified in Naming conventions. |
type | Required. Specifies the view type and can hold one of the following values:
|
view-columns | Required. Its value is in the view columns separated by blanks. The number of columns should be equal to the number selected in the as-query attribute. |
as-query | Required. Specifies the select table that defines the view. |
check-option | Optional. Default value is FALSE . If the value is TRUE , only modifications that are visible through the view are allowed, meaning that INSERT and UPDATE statements are valid only if the affected rows can be retrieved by the view afterward. |