List
Types of Database Integrity
(DRE)
Define
Domain Integrity
Values in a column must be valid and match type & format
e.g. text must go in a TEXT column
Define
Referential Integrity
Foreign keys must point to a valid primary key.
Define
Entity Integrity
Every row has a primary key that is unique
(Unique entity)
List
Types of Data Anomalies
(UID)
Define
Update Anomaly
Updating data stored in multiple locations that aren’t linked together
Insert Anomaly
When new data can’t be added due to its relationship with other data
(e.g. a db with a student id and course id, a new student id can’t be added without having a null course id)
Delete Anomaly
When deleting one piece of data leads to the deletion of another piece of data
(e.g. car rego database, where a person is deleted and their only car is deleted as a result)