CIS4365: Database Applications Fall, 2017 |
What is Database Integrity? Database integrity is all about trust. Can a business and its users trust the data stored in the database? Data integrity provides the necessary internal controls for the database. There are at least three types of data integrity that must be built into any database:
Key Integrity · Every table should have a primary key (which may be concatenated). · The primary key must be unique. · The primary key must not have a NULL value. · Most DBMSs enforce key integrity. Domain Integrity Appropriate controls must be designed to ensure that no field takes on a value that is outside of the range of legal values. For example, if grade point average is defined to be a number between 0.00 and 4.00, then controls must be implemented to prevent negative numbers and numbers greater than 4.00. Referential Integrity A referential integrity error exists when a foreign key value in one table has no matching key value in the related table. Referential integrity is specified in the form of deletion rules. This is a slightly modified version of information taken from Chapter 12 of “Systems Analysis and Design Methods” 5th addition by Jeffrey L. Whitten, Lonnie D. Bentley, And Kevin C. Dittman.
|