This chapter examined the need to enforce data integrity, looked at the types of integrity, and explored some of the methods used to enforce it. Primary among these methods are the constraints: PRIMARY KEY, FOREIGN KEY, UNIQUE, and CHECK. This chapter also looked at rules and defaults, which can enforce integrity by limiting possible values for a column or providing a consistent default value if no other is entered.

Proper use of these features results in a consistent, reliable dataset, which is protected from accidental or malicious misrepresentation of values. As long as humans are involved in the input of data, errors will exist; however, proper implementation of integrity constraints can help keep those errors to a manageable level.

    Part III: SQL Server Administration
    Part IV: Transact-SQL
    Part V: SQL Server Internals and Performance Tuning
    Part VI: Additional SQL Server Features