Teach MeShow MeLet Me TryPrint

Enforcing Referential Integrity

Enforcing referential integrity ensures that related database records remain accurate. If a relationship has enforce referential integrity checked, then the tables will conform to the following rules:

  1. You cannot add a record to the secondary table without an associated record in the primary table.
  2. You cannot make changes to the primary table that would cause records in the secondary table to become unmatched.
  3. You cannot delete records from the primary table if there are related records in the secondary table.

To enforce referential integrity in a relationship:

  1. Double-click the relationship line.
  2. Click the Enforce Referential Integrity check box in the Edit Relationships dialog.
  3. Click OK.
Notice the change to the relationship line. The 1 indicates the "one" table in the one-to-many relationship. The infinity symbol indicates the "many" table. When these symbols appear, you know that the relationship has referential integrity enforced.

The expert tutorial Defining Relationships has more information about creating and modifying relationships.