Enforcing Business Rules: Choosing Among INSTEAD of Triggers, Constraints, and AFTER Triggers

This is the final chapter that discusses techniques to enforce data integrity, and as a summary, you can propose which ways are recommended to enforce data integrity:

  • To uniquely identify every row, define a PRIMARY KEY constraint. This is one of the first rules to apply to designing a normalized database. Searching for values contained in a PRIMARY KEY is fast because there is a UNIQUE INDEX supporting the PRIMARY KEY.

  • To enforce uniqueness of required values in a column or group of columns, other than the PRIMARY KEY, define a UNIQUE constraint. This constraint does not produce much overhead because there is a UNIQUE INDEX supporting this constraint. ...

Get Microsoft® SQL Server™ 2000 Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.