且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

外键约束可能导致循环或多个级联路径

更新时间:2023-02-03 08:02:46

消息告诉您无法创建外键约束 FKFacSupervisor,因为此约束可能导致循环或多个级联路径.这意味着约束可能导致对一行的更新或删除可能导致对另一行的更新或删除,这反过来又可能导致对第一行的更新或删除.该消息还解释了可能的解决方案:指定 ON DELETE NO ACTION 或 ON UPDATE NO ACTION,或修改其他约束.只有了解架构和预期的使用模式,您才能决定哪些选项是***的.

The message is telling you that your foreign key constraint FKFacSupervisor cannot be created because this constraint could cause cycles or multiple cascade paths. That means that the constraint could result in a situation where updates or deletes to one row could cause updates or deletes to another row, which could in turn cause updates or deletes to the first row. The message also explains possible solutions: Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other constraints. Only by knowing the schema and the expected usage patterns can you decide which of those options will be best.