Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Create a Primary Key
How To:
To define a simple Primary Key consisting of a single column, follow the steps below:
Step |
Action |
See Also |
|---|---|---|
1 |
Right-click on the table in a diagram and select the Attributes context menu option The Attributes dialog displays |
|
2 |
Select the column that makes up the Primary Key |
|
3 |
Select the Primary Key checkbox and click on the Save button A stereotyped operation is automatically created; it is this operation that defines the Primary Key for the table To remove a Primary Key, simply delete this operation |
|
To define a complex Primary Key, consisting of more than one column, follow the steps below:
Step |
Action |
See Also |
|---|---|---|
1 |
Follow the steps above to create a Simple Primary Key; it doesn't matter which column you choose |
|
2 |
Right-click on the table in a diagram and select the Operations context menu option The Operations dialog displays |
|
3 |
Select the Primary Key operation (its name begins with PK_) and then click on the Column tab |
|
4 |
Click on the New button to add a column to the Primary Key, select a column from the Column Name list box, and then click on the Save button |
|
5 |
Click on the Hand buttons (up and down arrow) to change the order of columns in the Primary Key, if necessary |
|
Learn more