If the business decides that PROJECT-EMPLOYEEs are not existence- or identification-dependent on PROJECT, you can change the relationship between PROJECT and PROJECT-EMPLOYEE to optional, non-identifying. In this type of relationship, the referential integrity options are very different:
Since a foreign key contributed across a non-identifying relationship is allowed to be NULL, one of the referential integrity options you can specify for PARENT DELETE is Set Null. Set Null indicates that if an instance of PROJECT is deleted, then any foreign key inherited from PROJECT in a related instance in PROJECT-EMPLOYEE should be set to NULL. The Delete does not cascade as in our previous example, and it is not prohibited (as in Restrict). The advantage of this approach is that you can preserve the information about the PROJECT‑EMPLOYEE while effectively breaking the connection between the PROJECT-EMPLOYEE and PROJECT.
Use of Cascade or Set Null should reflect business decisions about maintaining the historical knowledge of relationships, represented by the foreign keys.
Copyright © 2017 erwin Inc.
All rights reserved.
|
|