O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required