Enforcing Referential Integrity Between Tables

Referential integrity between tables is enforced by default when you create a relationship in your database diagram. An enforced relationship ensures each value entered in a foreign key column matches an existing value in the related primary key column.

You can change the conditions under which referential integrity is enforced by editing the relationship's properties.

To change referential integrity options for a new relationship

  1. In your database diagram, create a relationship. For details, see Creating a Relationship Between Tables.

  2. In the Create Relationship dialog box, clear or select one or more of the options.

    For information about the options available for SQL Server databases, see Database Designer Considerations for SQL Server Databases.

To change referential integrity options for an existing relationship

  1. In your database diagram, select the relationship line.

  2. Right-click the relationship line and select Properties.

  3. Choose the Relationships tab.

  4. Select the relationship from the Selected relationship list.

  5. Clear or select one or more of the options.

    For information about the options available for SQL Server databases, see Database Designer Considerations for SQL Server Databases.

The relationship is updated in the database when you save the diagram or either of the related tables.

See Also

Foreign Key Constraints | Primary Key Constraints | Table Relationships | Unique Constraints