Domain Integrity Constraints
The Domain Integrity constraints are based on the column values and violations are prevented or any deviations. The two categories of Domain Integrity Constraints are
• Not Null Constraints
• Check Constraints
Choosing NULL Constraint
By default all columns can holds null values. NOT NULL constraints are used for columns which absolutely needs values at all times. NOT NULL constraints are frequently combined with other kinds of constraints to additional restrict the values which can exist in specific columns of a table.
Choosing Check Constraint
Check Constraints are used to check whether the values in the table satisfy the criteria specified for that column. They contain conditions. These Conditions have the subsequent limitations.
• Conditions must be a boolean expression which can be evaluated using the values in the record being inserted or updated.
• Conditions must not hold sub-queries
• Conditions cannot hold any SQL functions
• Condtions cannot hold pseudocolumns.