Stage 6: Design the physical data model
Knobit of Data modelling · K-613 · Skill
Recognises a referential action destroying what should survive
What it means
`ON DELETE CASCADE` or `SET NULL` on a relationship whose child has a life of its own. A deletion anomaly made automatic: deleting one fact silently deletes or erases another.
How it is assessed
Flags the deficient case and passes the acceptable one. Deficient: `fk_payment_account` with `on_delete: cascade`: purging a closed account deletes its payments and holds. `fk_payment_authorised_by` with `set null`: deleting a user erases who authorised the payment Acceptable: `on_delete: restrict` by default; `cascade` only for children that cannot exist without the parent (an instalment with its repayment schedule), with the data rule cited
Builds on
- Recognises a deletion anomaly in a logical data modelK-503 · Skill
- Explains referential integrity and referential actionsK-653 · Knowledge
Needed by
- None