Working with Unique Constraint

Unique constraints help to enforce the uniqueness of specific columns. You can add unique constraints to an entity to make sure that no duplicate values are entered in specific columns. A unique constraint may consist of a single column, or combination of columns.

Creating a unique constraint

To create a unique constraint:

  1. Right click on the entity and select Open Specification... from the popup menu.
  2. Open the Constraints tab.
  3. At the bottom right of the specification window, click Add > Unique Constraint....
    Add a unique constraint
    Add a unique constraint
  4. In the Unique Constraint Specification window, enter the name of the constraint.
    Name the unique constraint
    Name the unique constraint
  5. Select the columns to be included and click >.
    Add columns to the constraint
    Add columns to the constraint
  6. Click OK to return to the Entity Specification.
  7. Click OK to return to the diagram. You can see the selected column(s) is marked unique.
    Columns marked unique
    Columns marked unique

Showing the name of unique constraints in entity

To show the name of unique constraint in entities in an ERD, right click on the ERD and select Presentation Options > Entity Columns Display Options > Show Column Unique Constraint Name from the popup menu. With enough shape width, you can see the constraint names of columns.

Constraint name shown
Constraint name shown

 

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
10. Modeling Triggers in ERD Table of Contents 12. Using ID Generator
 

Technical Support

Have technical issues or suggestions? Please contact Visual Paradigm Support Team.

Sales Support

Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.

Discussion Forum

Share your suggestions of opinions at VP Discussion Forum.