Understanding Database Constraints - Intergraph Smart P&ID - Help - Intergraph

Intergraph Smart P&ID Help

Language
English
Product
Intergraph Smart P&ID
Search by Category
Help
Smart P&ID Version
9 (2019)
Smart Engineering Manager Version
10 (2019)
SmartSketch Version
10.0(2018)

The following database constraints improve the integrity of the data associated with your design.

Foreign Key

Insures that the corresponding value, unless it is null, exists in the table referenced by the foreign key. This type of constraint is used to enforce logical relationships, such as the plant item to plant group relationship.

Foreign Key in conjunction with Not Null

Enforces group relationships, such as the case to model item relationship. This constraint is similar to the Foreign Key constraint described above but does not allow null values to persist.

Foreign Key with Not Null and Unique

Enforce all subclass and one-to-one relationships, such as the pairing of OPCs. This constraint is similar to the Foreign Key constraint described above but does not allow null values to persist and requires that all values be unique.

The constraints so far described serve to enforce relationship integrity. Because the relationship, the object, and the foreign key it points to, already exists in the database or is created during your transaction, the constraints are satisfied without changing the scope of your transaction.

Check

Used for more complex data integrity controls, such as monitoring conditions on multiple items. For example, History records can pertain to either a drawing or the model. Either of these objects can be null, but not both of them. A Check constraint enforces this condition by using comparisons and exclusions. Another candidate for a Check constraint is the enforcement of certain values for one or more items. For example, invalid null or zeros assigned to properties are tested against Check constraints.