A foreign key makes the database refuse rows that point at something that does not exist, and refuse deleting a row that is still referenced (SQLSTATE 23503).
Foreign key
A column that must match a primary key value in another table.
A foreign key makes the database refuse rows that point at something that does not exist, and refuse deleting a row that is still referenced (SQLSTATE 23503).