Suppose there are two tables "teacher" and "schoolClass".
"teacher": ID, Name; classID. "schoolClass": ID, Name, TeacherID "teacher.classID" - points to the ID from "schoolClass", "schoolClass.TeacherID" - points to the teacher ID in the first table. Is it possible at the base level to make so that when you save (add) a teacher with a filled "classID" , the changes are reflected in the table "schoolClass": TeacherID and vice versa: when you save the class, the changes also take place in the "teacher". Which way to google?