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).