Integrity Constraints Flashcards
What does NULL represent?
A value of an attribute that is currently unknown or is not applicable for this tuple
What is Entity integrity?
Every relation must have a primary key. The primary key must not contain NULL values.
How is the Entity integrity implemented?
Implemented through primary key constraint
What is Referential integrity?
If a foreign key exists in a relation, either the foreign key must match a candidate key value of some tuple in its home relation OR the foreign key values must be wholly NULL
How is Referential integrity implemented?
Implemented through foreign key constraint. This ensures that a value in one relation matches a value in another relation
What is General constraints?
Additional rules specified by users or database administrators that the data must satisfy
What are some examples of General constraints?
Unique constraints (all attribute values must be unique)
Not null constraint (attributes can’t contain null values)
Default value constraint (a default value is used if no attribute value is provided)
Check constraint (all attribute values must meet a certain condition)