Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Check Constraints
A Check Constraint enforces domain integrity by limiting the values that are accepted by a column.
Access In diagram or Project Browser | Right-click on Table | Features & Properties | Operations > Constraint | Add New Constraint (Ctrl+N)
Create a Constraint
Step |
Action |
See also |
---|---|---|
1 |
On the Constraint tab of the Columns and Constraints screen, 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 the constraint as a check constraint, such as CHK_ColumnName. (The CHK_ prefix is optional.)
|
|
2 |
In the Type field, change the value from index to check.
|
|
3 |
In the Condition property, type in the entire check constraint clause; for example, coll < 1000. If the condition is long, click on the expansion button ( ... ) at the end of the field and type the condition into the Check Condition for constraint <table name> dialog.
|
|
4 |
If necessary (and if the DBMS you are using supports it), you can type a formatted comment on the Check Constraint in the field on the Notes tab.
|
|
5 |
Click on the Close button.
|
|
Delete a Check Constraint
If you do not want to keep a check constraint, either:
· | Right-click on it in the list and select Delete constraint '<name>', or |
· | Click on the item and press Ctrl+D |
The constraint is immediately deleted.
Learning Center topics
· | (Alt+F1) | Enterprise Architect | Database Engineering | Physical Data Model | Check Constraint |