I hope you are well.
What happens is the following, I am developing a simple web application for a school and I am working with a relational database as seen in the attached image.
In my web application access several users (Officials, Teachers, Parents, Students) and each one has a different role, therefore different functionalities. For example, students only consult notes, teachers update notes, officials can create and delete users in the database; here my question arises, how do I control the issue of the elimination of users in the tables taking into account the relationships that have the same? , for example, if an official wishes to eliminate the user of a parent should first remove the record of a student belonging to said parent, taking into account the relationship theory of parent and daughters tables due to the primary and foreign keys.
That's what I do not know, because I think it would be wrong to write a message on the screen saying to the official, you must first delete the student's record to eliminate the parent's. I would like to know what would be most appropriate for these cases or if I should reformulate the relationships of the tables.
Sorry for writing so much and I thank you very much.