A business rule is a statement that defines some characteristics of the business. In most businesses, the data must adhere to a specific set of rules and restrictions such as an employee having a valid employee ID. These restrictions can be effectively implemented at the database layer using constraints.
The types of constraints available within Db2 are:
- NOT NULL
- DEFAULT
- CHECK
- UNIQUE
- NOT ENFORCED informational
- Referential integrity
The constraints are usually defined during table creation, however they can also be added to existing tables by using the ALTER TABLE statement.