Types of Data Integrity


How integrity is enforced depends on the type of integrity being enforced. The types of data integrity are Domain, Entity, and Referential.

Domain Integrity

Domain integrity refers to restricting the values that are valid for a column and the allowance or absence of nulls. Domain integrity is enforced by the datatype, restriction of the use of nulls, and validity checking such as is done with check constraints.

Entity Integrity

Entity integrity requires that all rows in a table be unique. This is enforced with a unique identifier known as the primary key.

Referential Integrity

Referential integrity maintains the dependent values between tables. Referential integrity is enforced with a primary key/foreign key relationship. Referential integrity ensures data in one table maintains its relationship with data in another table, that all foreign key, or child, records in one table relate to the valid primary key, or parent, records in another table.



Microsoft SQL Server 2000 Unleashed
Microsoft SQL Server 2000 Unleashed (2nd Edition)
ISBN: 0672324679
EAN: 2147483647
Year: 2002
Pages: 503

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net