如何处理删除异常?

时间:2012-04-10 21:12:43

标签: database-design relational-database rdbms referential-integrity

"There are circumstances in which the deletion of data representing certain facts
necessitates the deletion of data representing completely different facts. The 
"Faculty and Their Courses" table described in the previous example suffers 
from this type of anomaly, for if a faculty member temporarily ceases to be 
assigned to any courses, we must delete the last of the records on which that 
faculty member appears, effectively also deleting the faculty member. This 
phenomenon is known as a deletion anomaly."

如何在关系数据库管理系统中处理删除异常?有没有“软删除”的替代方案?

1 个答案:

答案 0 :(得分:4)

删除异常是数据库设计错误的明显症状(假设是事务性的)。摆脱它们的最好方法是将模型标准化为至少 - 第三范式(3NF)。

可以找到一个很好的解释here