Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Required only for the data types listed below. Specifies the column data length:

  • CHAR 
  • CLOB
  • DECIMAL
  • FLOAT
  • INTEGER 
  • VARCHAR
  • VARBINARY 
data-scaleRequired only for the data type DECIMAL. Specifies the column data scale.
nullRequired. 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:

  • NULL if the column is nullable (null=TRUE).
  • N/A if no default exists. If the attribute is omitted, this is the default.

A constant value that is equal to the column type:

  • BOOLEAN TRUE or FALSE
  • CHAR A textual constant, such as ABC CLOB; a textual constant, such as ABC DECIMAL; or a decimal point constant, such as 10.3
  • FLOAT A floating point constant, such as 12E7
  • INTEGER An integer constant, such as 27
  • TIMESTAMP One of the following:
    • A timestamp constant of the format yyyy-mm-dd hh:mm:ss.fffffffff, which is jafa.sql.Timestamp’s format, such as 2020-02-20 23:07:35:175000000. Each DBMS displays a slightly different default. Implementation:
      • 2020-02-20 23:07:35:175 for Microsoft SQL Server
      • TO_DATE('2020-02-20 23:07:35') for Oracle
    • The literal string CURRENT TIMESTAMP. Implementation:
      • GETDATE() for Microsoft SQL Server
      • SYSDATE for Oracle
  • UNIQUE INTEGER Default value not required and not allowed.
  • VARCHAR A textual constant, such as ABC
  • VARBINARY A hex string where every two hexadecimal digits represent one byte, such as A07C889F. Each DBMS displays a slightly different default. Implementation:
    • 0xA07C889F for Microsoft SQL Server
    • HEXTORAW('A07C889F') for Oracle
type

Required for the column role in columns of statistics tables. Can have the following values:

  • IDENTIFIER A column identifying the sampled entity. The concatenation of all identifiers should uniquely identify the entity.
  • DATE A column identifying the sampled period. Its type should be TIMESTAMP and be equal to the beginning of the sampled period.
  • SUM A statistics column whose transfer to a higher summary level (such as hourly to daily) should be applied by the SUM function.
  • MIN A statistics column whose transfer to a higher summary level (such as hourly to daily) should be applied by the MIN function.
  • MAX A statistics column whose transfer to a higher summary level (such as hourly to daily) should be applied by the MAX function.
  • AVG A statistics column whose transfer to a higher summary level (such as hourly to daily) should be applied by the AVG function.

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”/>
Info

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.

AttributeDefinition
nameRequired. Holds the index name. The name should follow the naming conventions specified in Naming conventions. 
uniqueRequired. Has the value TRUE if the index is unique and FALSE if it is not.
primary

Required. Has the value TRUE if this is a primary index and FALSE if it is not. Implementation:

  • ALTER TABLE ADD CONSTRAINT for Microsoft SQL Server. Adding a primary constraint in Microsoft SQL Server always results in creating a unique index to enforce the constraint.
  • An index is created using the CREATE INDEX statement for Oracle. Then an ALTER TABLE ADD CONSTRAINT is performed to add the primary constraint. The ALTER TABLE ADD CONSTRAINT is suffixed with the USING INDEX clause to instruct Oracle to use the already created index to enforce the constraint and not to create a new one.
clustered

Optional. Has the value TRUE if this is a clustered index and FALSE if it is not. The default is FALSE . A clustered index is an index that physically orders and organizes the table. Implementation:

  • CLUSTERED clause for a clustered index, NON CLUSTERED clause for a non-clustered index in Microsoft SQL Server.
  • In Oracle, this feature is not used frequently; it requires a complete entity to handle clustering.
mssql-additional-clauseOptional. Only relevant for Microsoft SQL Server. Allows specifying every parameter defined in the "with" section.



Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
Newtabfooter
aliasIDERA
urlhttp://www.idera.com
 | 
Newtabfooter
aliasProducts
urlhttps://www.idera.com/productssolutions/sqlserver
 
Newtabfooter
aliasPurchase
urlhttps://www.idera.com/buynow/onlinestore
 | 
Newtabfooter
aliasSupport
urlhttps://idera.secure.force.com/precise/
 | 
Newtabfooter
aliasCommunity
urlhttp://community.idera.com
 
|
 
Newtabfooter
aliasResources
urlhttp://www.idera.com/resourcecentral
 | 
Newtabfooter
aliasAbout Us
urlhttp://www.idera.com/about/aboutus
 
Newtabfooter
aliasLegal
urlhttps://www.idera.com/legal/termsofuse