November 2008
Intermediate to advanced
591 pages
17h 28m
English
Constraints allow you to automatically enforce the integrity of data and to filter the data that is placed in a database. In a sense, constraints are rules that define which data values are valid during INSERT, UPDATE, and DELETE operations. When a data-modification transaction breaks the rules of a constraint, the transaction is rejected.
In the ANSI standard, there are four constraint types: CHECK, PRIMARY KEY, UNIQUE, and FOREIGN KEY. (The RDBMS platforms may allow more; refer to Chapter 3 for details.)