Constraints

From PPDM Wiki
Jump to: navigation, search

Constraints are used by relational databases to enforce referential integrity. This is done by creating a limitation on the values that the constrained column may have. A check constraint lists the specific values a column may have (for example, columns named %_IND may have the value Y, N, or be NULL). A foreign key constraint ensures that values in a child table can be matched to values in a parent table before the child values can be loaded. For example, a WELL TEST must have a UWI that corresponds to the UWI in its parent WELL table, or the WELL TEST cannot be loaded.

Personal tools