Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Create Columns

What is a Column?

The basic organizational element of a relational database is the column. Every individual item of data entered into a relational database is represented as a value in a column of a row in a table. Columns are represented in the UML Data Modeling Profile as a stereotyped attribute; that is, an attribute with the Column stereotype.

Create Columns


For MySQL, before creating columns first add ENUM and SET datatypes. Select the Settings | Database Datatypes menu option and, on the Database Datatypes dialog, in the Product Name field select MySQL. Add the datatypes ENUM and SET.

To create columns, follow the steps below:

  1. Right-click on the Table in a diagram to open the context menu, and select the Attributes menu option.
  2. The <Tablename> Columns dialog displays.
  3. In the Name field, type the column name.
  4. In the Data Type field, click on the drop-down arrow and select the data type, and click on the Save button.


If the drop-down list of datatypes is empty, this means that you have not selected a target database for the table. Close the Columns dialog and re-open the Table Properties dialog to set a database type before continuing. To prevent this recurring, set the default database type.

  1. The following fields for each column are optional:
  • Primary Key - select the checkbox if the column represents the primary key for this table
  • Not Null - select the checkbox if empty values are forbidden for this column
  • Unique - select the checkbox if it is forbidden for any two values of this column to be identical
  • Initial - type a value that can be used as a default value for this column, if required
  • Access - click on the drop-down arrow and select a scope of Private, Protected or Public (the field defaults to Public)
  • Alias - type an alternative name for the field (for display purposes), if any
  • Notes - type any other information necessary to document the column; you can format the text using the Notes toolbar at the top of the field.


  • The unique characteristic applied to a single column ensures that no two data values in the column can be identical. The unique stereotype applied to an index ensures that no two combinations of values across a set of columns can be identical.
  • Some datatypes, such as the Oracle NUMBER type, require a precision and scale. These fields are displayed where required and should be filled in as appropriate. For example, for Oracle:
    create NUMBER by setting Precision = 0 and Scale = 0
    create NUMBER(8) by setting Precision = 8 and Scale = 0
    create NUMBER(8,2) by setting Precision = 8 and Scale = 2.
  • Oracle VARCHAR2(15 CHAR) and VARCHAR2(50 BYTE) datatypes can be created by adding the tag LengthType with the value CHAR or BYTE.
  • For MySQL ENUM and SET datatypes, in the Initial field type the values as a comma-separated list, in the format ('one','two','three') or, if one value is the default, in the format: ('one','two','three') default 'three'.
  1. Click on the Column Properties button. The Database Columns Properties dialog displays.
    If you require a sequence, such as an Oracle sequence, select the AutoNum property, set the value to True and, if necessary, define the start number and increment. Click on the OK button to return to the <Tablename> Columns dialog.
  2. Click on the Save button and on either the New button to define another column or the Close button to exit from the dialog.

Change the Column Order

To change the column order, follow the steps below:

  1. On the Columns dialog, highlight a column name in the Columns panel.
  2. Click on the:
  • uphand button to move the column up one position
  • downhand button to move the column down one position.