Controlling the integrity of your database with constraints

A constraint is a restriction or limitation placed on a database file to ensure that the data in your database remains consistent when you add, change, and remove records.

  • Unique constraints and primary key constraints let you create enforced unique keys for a physical file beyond the file access path.
  • Check constraints provide another check for the validity of your data by testing the data in an expression.

Primary key and unique constraints can be used as the parent key when adding a referential constraint.