Hi to all,
I have a scenario like this:
(SchoolName, etc, etc...)
(SchoolName,TeacherName, etc, etc...)
(SchoolName,StudentName, etc, etc...)
(SchoolName, TeacherName, StudentName, etc, etc...)
ForeignKey: [Teacher.SchoolName,Teacher.TeacherName] + [Student.SchoolName,Student.StudentName]
I would like to change the name of the school by updating the School table which updates all other tables using foreign key 'On UPDATE CASCADE', however, a foreign key constraints was violated at Lesson table. I'm currently using MySQL. I have heard that some database have "defered" checks for constraints which might solve this problem.
Or can this problem be solved by changing the foreign key structure?
Thanks for the advice.