I am designing a database that archives all class schedules and student attendances based on these schedules. So here are the tables.
Teacher, Subject, Classroom, Class
Schedule table has many-to-many relationship to the above tables.
Schedule: date (date), start_time (time), end_time (time), teachers (m2m to Teacher), subject (foreign key to Subject), classrooms (m2m to Classroom), student_classes (m2m to Class)
My issues is that the schedules must be persistent. However, the teachers may be deleted from the system. How do I design my dependencies so that removing them will not affect the schedules. Currently all relationships use integer primary key.