Here are a few examples of how the data in a database may become invalid if proper checks are not made. Each of these examples can be prevented by facilities described in this chapter.
An operator enters orders to an orders table for a customer_id that does not exist in the customers table.
An operator enters text where numeric data is required.
An operator enters numeric data that is too wide for the column.
A new department has been created, with dept_id 200, and needs to be added to the department table of the organization's database—but two people enter this information into the table.