8.23 cascade

2019-08-24  本文已影响0人  鲸鱼酱375

1.Cascade Function

正常创建fk之后,如果删除主表的pk,受constraint限制,是会报错的

2.Different Cascade Options

Delete Mandatory �Update Optional

3.Pro’s and Con’s of using Cascade

Automated and will make things easier to change in regard to the Parent Child policy
Easier doesn’t equal better, as it’ll be easier to make a mistake
With no logging for cascaded deleted values, that information is gone
Has to be used on each FK

上一篇下一篇

猜你喜欢

热点阅读