You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

DDML, a language based on XML (Extensible Markup Language), allows you to logically define the entities you want to add to the Precise schema, such as tables, views, indexes, foreign keys, and all other required components. It covers the common entities available in most popular DBMSs.

After you have defined all database entities in DDML, you must run the DDML creation script to physically create the entities in the database.

General DDML document format

The general format of a DDML document looks as follows:

TagDescription
<tables-definition>

Root element of a DDML document. Its children are the main database entities:

<table-definition>, <ddl-definition>, and <view-definition>. The <tables-definition> tag includes the product attribute, which indicates the product of this specific DDML definition.

<table-definition>

Includes the table-level attributes. Its children are the <column-definition>, <index-definition>, and <foreign-key-definition> tags.

If a table is a statistics table, meaning means that the type attribute has the value STATISTICS, the <summary-hour>, <summary-day>, <summary-week>, and <summary-month> tags can be specified as children of the <table-definition> tag.

<ddl-definition>Includes ddl-level attributes.
<view-definition>Includes view-level attributes.

<tables-definition> tag

Root element of the DDML document.

AttributeDefinition
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:

  • C1 For customer-defined 1
  • C2 For customer-defined 2
  • C3 For customer-defined 3

<table-definition> tag

Holds all of the information included in a single table.

AttributeDefinition
nameRequired. Holds the table name.
type

Required. Specifies the table type and can hold one of the following values:

  • Statistics. A PMDB table that holds information about certain database activity, summarized into hours or time slices.
  • Events. A PMDB table that keeps a log of database incidents.
pctfree

Optional. Affects only Oracle and is developed as PCTFREE pctfree.

Can have a value between 0 and 99.

If the PMDB is a Microsoft SQL Server database, this attribute is transformed to fill factor.

pctusedOptional. Affects only Oracle and is developed as PCTUSED pctused. Can have a value between 0 and 99.
initransOptional. Affects only Oracle and is developed as INITRANS initrans. Can have a value between 1 and 255.
maxtransOptional. 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 STORAGE(oracle-storage-clause). For example:

oracle-storage-clause="initial 1M next 1M minextents 1maxextents unlimited pctincrease 100"

oracle-additional-clauseOptional. Added to support any other Oracle features that cannot be defined in an Oracle storage clause. For example: NOLOGGING
filterableRequired 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:

  • <column-definition>
  • <index-definition>
  • <foreign-key-definition>
Additional ChildDefinition
<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.

<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.

AttributeDefinition
statementRequired. Defines the DDL statement.
dbms

Optional. the RDBMS type on which the DDL generates. Must be one of the following:

  • oracle
  • mssql
  • ""

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 8.1. ... If left empty, the DDL is created on all RDBMS versions.

event

Optional. The RDBMS version on which the DDL generates. Must be one of the following:

  • INSTALL Default. During the installation process only.
  • UNINSTALL During the uninstallation process only.
  • PREINSTALL Before the installation process.
  • PREUNINSTALL Before the uninstallation process.

<view-definition> tag

Holds all the parameters required for a view definition.

AttributeDefinition
nameRequired. 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:

  • STATISTICS A PMDB view that holds information about certain database activity, summarized into hours or time slices.
  • INTERNAL A PMDB view that keeps any other, non-statistical information.
view-columnsRequired. 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-queryRequired. Specifies the select table that defines the view.
check-optionOptional. 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.

<column-definition> tag

Holds all the parameters of a column.

AttributeDefinition
nameRequired. 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:

  • BOOLEAN Does not require data-length or data-scale attributes. These attributes should not be specified. Implementation on all DBMSs:
    • CHAR(1) where T is the boolean TRUE value and F is FALSE.
  • CHAR Requires data-length attribute. Implementation on all DBMSs:
    • CHAR(data-length)
  • CLOB Requires data-length attribute. Implementation:
    • TEXT for Microsoft SQL Server
    • CLOB for Oracle
  • DECIMAL Requires data-length (used for precision) and data-scale attributes. Implementation:
    • NUMBER(data-length, data-scalefor Microsoft SQL Server and IBM UDB Oracle
  • FLOAT Requires data-length attribute. Implementation:
    • FLOAT(data-length) for Microsoft SQL Server
    • NUMBER without any parameters for Oracle
  • INTEGER Requires data-length attribute. Implementation:
    • data-length less than three: TINYINT; data-length two-to-four: SMALLINT; data-length more than four: BIGINT for Microsoft SQL Server
    • NUMBER(data-lengthfor Oracle
  • TIMESTAMP Does not require data-length or data-scale attributes. These attributes should not be specified. Implementation:
    • DATETIME for Microsoft SQL Server
    • TIME for Oracle
  • UNIQUE INTEGER Does not require data-length or data-scale attributes. These attributes should not be specified. This is a data type for a unique integer whose values are generated automatically. Implementation:
    • IDENTITY for Microsoft SQL Server
    • NUMBER(20,0) for Oracle. In addition, a SEQUENCE and a TRIGGER BEFORE INSERT are created, which select the NEXTVAL of the SEQUENCE from DUAL.
  • VARCHAR Requires the data-length attribute. Implementation:
    • VARCHAR(data-lengthfor Microsoft SQL Server
    • VARCHAR2(data-lengthfor Oracle
  • VARBINARY Requires the data-length attribute. Implementation:
    • VARBINARY(data-length) for Microsoft SQL Server
    • RAW(data-length) for Oracle
data-length
data-scale
null
default
type
IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal
  • No labels