Define Database Column Properties

Use the <Database> tab in the Columns dialog to manage the datatype, null option, and default value for the selected column. You can also enter column volumetrics information. The name of this tab, and all DBMS-specific options, change dynamically depending on your target server. For example, if you are working with an Ingres target server, the tab reads Ingres and contains column options specific to Ingres. In some Columns dialogs, options are provided on two tabs, such as Access.

Note: An asterisk next to any property indicates that the property value is derived from domain inheritance or a macro.

To define column properties for your database

  1. Click Columns on the Model menu.

    The Columns dialog opens.

  2. Click the <Database> tab.

    The <Database> tab opens.

  3. Select from the following options and click OK:
    <Database> Datatype

    Lets you select a datatype from the list to change the datatype of the selected column. If the selected datatype requires a value for precision, scale, or both, enter the value inside the datatype parentheses. For example, you can select the DECIMAL() datatype and specify a precision of 2 and a scale of 10 inside the parentheses, to assign the datatype DECIMAL(2,10) to the selected column.

    Null Option

    Lets you specify from the following options, which vary depending on your target server.

    NOT NULL

    Lets you specify the NOT NULL clause for the selected column.

    NULL

    Lets you specify the NULL clause for the selected column.

    IDENTITY

    Lets you specify an IDENTITY clause for the selected column.

    Note: The AUTO_INCREMENT feature is supported for MySQL. When you select a numeric datatype such as Integer on the MySQL tab, the Identity option becomes available. When you select this option and perform forward engineering, it generates the AUTO_INCREMENT syntax. Only one AUTO_INCREMENT column per table is allowed.

    WITH NULL

    Lets you specify the WITH NULL clause for the selected column.

    NOT NULL WITH DEFAULT

    Lets you specify the NOT NULL WITH DEFAULT clause for the selected column.

    Average Width

    Lets you enter an estimated average width for the column if the option is available (not dimmed). You can later use the Volumetrics dialog to calculate table and database size estimates based on these and other values

    Percent NULL

    Lets you enter the estimated percentage (using whole numbers) of nulls used for that column if the option is available. For example, you can estimate a variable width ADDRESS 2 column assigned a width of 50 characters, to be NULL about 30 percent of the time. You can later use the Volumetrics dialog to calculate table and database size estimates based on these and other values.

More information:

Define Access Database Column Properties

Define iSeries Database Column Properties

Define Progress Database Column Properties

Define Teradata Database Column Properties