Domain Integrity

Domain integrity controls the validation of values for a column. You can use domain integrity to enforce the type, format, and possible values of data stored in a column. SQL Server provides several mechanisms to enforce domain integrity:

• You can control the type of data stored in a column by assigning a data type to the column.

• You can use CHECK constraints and rules to control the format of the data.

• You can control the range of values stored in a column by using FOREIGN KEY constraints, CHECK constraints, default definitions, nullability, and rules.

Get Microsoft® SQL Server 2008 R2 Unleashed 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.