Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Create Database Table Columns
A database Table column is represented in the UML Data Modeling Profile as an attribute with the <<column>> stereotype. For a selected Table, you can review the existing columns and create new columns, on the 'Columns' page of the Database Builder or on the 'Columns and Constraints' screen.
You can define column details directly on the list of columns on the 'Columns' tab. The changes are automatically saved as you complete each field. Some fields have certain restrictions on the data you can enter, as described here. The tab also contains a 'Properties' panel and a 'Notes' field, which are populated with the existing information on the selected column. Each new column that you create is automatically assigned a set of default values and added to the bottom of the list.
Access Tools | Database Builder | Click on Table > Columns | Right-Click | Add new Column (Ctrl+N)
In diagram, right-click on required Table | Features & Properties | Attributes > Columns | Right-click | Add new column (Ctrl+N)
Select a Table: F9
Create columns in a Table
Field/Option/Button |
Action |
See also |
---|---|---|
Name |
Overtype the default name with the appropriate column name text. |
|
Type |
Click on the drop-down arrow and select the appropriate datatype for the column. The available datatypes depend on the DBMS assigned to the parent Table. |
|
Length |
(Optional) Some datatypes have a length component - for example, VARCHAR has a length that defines the number of characters that can be stored. If the datatype does not have a length component, this field is disabled. If the field is available and if you need to define a number of characters, type the value here. |
|
Scale |
(Optional) Some datatypes have a scale component - for example, DECIMAL has a scale that defines the number of places of decimal that can be held. If the datatype does not have a scale component, this field is disabled. If the field is available and if you need to define a scale, type the value here. |
|
PK |
Select the checkbox if the column is part of the Primary Key for this Table. |
Primary Keys |
Not Null |
Select the checkbox if empty values are forbidden for this column. The checkbox is disabled if the 'PK' checkbox is selected. |
|
Alias |
If required for display and documentation purposes, type in an alternative name for the field. |
|
Initial Value |
If required, type in a value that can be used as a default value for this column. |
|
Notes |
Type in any additional information necessary to document the column. You can format the text using the Notes toolbar at the top of the field. |
Notes |
Column Properties
The appropriate properties for the Table's Database Management System automatically display in the Property panel (expand the Column (<name>) branch if they are not visible).
Property |
DBMS |
See also |
---|---|---|
Autonum (Startnum Increment) |
Oracle MySQL SQL Server DB2 PostgreSQL Sybase ASA Sybase ASE Notes: If you require an automatic numbering sequence, set this property to True and, if necessary, define the start number and increment. |
|
Generated |
DB2
Notes: Set this additional property for auto numbering in DB2, to 'By Default' or 'Always'. |
|
NotForRep |
SQLServer Notes: Set this property to True if you want to block replication. |
|
Zerofill |
MySQL
Notes: Set this property to True or False to indicate if fields are zerofilled or not. |
|
Unsigned |
MySQL
Notes: Set this property to True or False to indicate whether or not fields accept unsigned numbers. |
|
LengthType |
Oracle Notes: Set this property to define the character semantics as 'None', 'Byte' or 'Char'. |
Learn more
- The Database Builder
- Database Tables
- Database Table Columns
- Delete Database Table Columns
- Reorder Database Table Columns
Learning Center topics
- Alt+F1 | Enterprise Architect | Database Engineering | Physical Data Model | Add Column