Relational Model- Integrity Flashcards
Database integrity
The configuration of data values in a database should reflect reality at any given point in time.
Accurate, consistent, complete (meet data quality standards)
Enforcing data integrity
Through Integrity rules through
Candidate keys and foreign keys
Candidate key
A candidate key has both the uniqueness property and the irreducibility property.
Provides the tuple-level addressing mechanism (helps us find the exact tuple we want in a relational system)
Uniqueness property
No two distinct tuples in the relation have the same value for the candidate key. One primary key.
Irreducibility property
No proper subset of candidate keys has the uniqueness property
Alternate keys
If there is more than one candidate key the ones that aren’t chosen as the primary keys are the alternate key
Why irreducibility
DBMS protects integrity by not allowing inserts of duplicate candidate key values.