Not a bad practice
- If
ON DELETE CASCADEis used accidentally, the entire hierarchy can be deleted.
- During Self Join, table scans could occur more than twice. (SQL JOIN)
Self Join simply accesses the same table twice with aliases, but from the engine's perspective, they are two independent relation instances.
/notebo
Self Join is possible without a Foreign Key, but in that case, orphaned data (children without parents) can occur, so data integrity should be ensured with a Self-Referencing Foreign Key constraint.
Self Referential Foreign Key Constraint in RDBMS and Self Join
What is Self Referencing Foreign Key?
https://sudhass.medium.com/self-referencing-foreign-key-constraint-in-rdbms-and-self-join-b66186e672f7

Seonglae Cho