Book a Demo
Prev Next

Unique Constraints

Unique Constraints enforce the 'uniqueness' of a set of fields in all rows of a Table, which means that no two rows in a Table can have the same values in the fields of a Unique Constraint. Unique Constraints are similar to Primary Keys (in that they also enforce 'uniqueness') but the main difference is that a Table can have multiple Unique Constraints defined but only one Primary Key.



Develop > Data Modeling > Database Builder > Click on Table name > Constraints/Indexes > Right-click > Add New Constraint

Context Menu

In diagram or Browser window | Right-click on Table element | Features | Constraints/Indexes

Keyboard Shortcuts

Click on Table: F9 > Constraints/Indexes: Ctrl+N

Create a Constraint



See also


On the 'Constraints/Indexes' tab, a new constraint is automatically created and assigned the default constraint name and a 'Type' of index.

Overtype the constraint name with a name that identifies this as a unique constraint.


In the 'Type' field, change the value from 'index' to 'unique'.


  • Warning: Enterprise Architect assumes that Unique Constraints have at least one column assigned to them; however, Enterprise Architect does not enforce this rule during modeling
    If DDL is generated for a Table that has a unique constraint defined without column(s) assigned, that DDL will be invalid

Learn more