Summary

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

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition 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.