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:
- You cannot add a record to the secondary table without an associated record in the primary table.
- You cannot make changes to the primary table that would cause records in the secondary table to become unmatched.
- You cannot delete records from the primary table if there are related records in the secondary table.
To enforce referential integrity in a relationship:
- Double-click the relationship line.
- Click the Enforce Referential Integrity check box in the Edit Relationships dialog.
- 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.