mysql学习记录(一)

来源:互联网 发布:python核心编程第3版 编辑:程序博客网 时间:2024/04/27 21:02

使用mysqlworkbench数据库建模生成的数据库,其中外键显示:
**ON DELETE NO ACTION
ON UPDATE NO ACTION**
Oracle allows three different definitions under the definition of the foreign key:

ON DELETE CASCADE (when a referenced parent table row is removed all the child are removed automatically)The ON DELETE SET NULL action allows data that references the parent key to be deleted, but not updated. When referenced data in the parent key is deleted, all rows in the child table that depend on those parent key values have their foreign keys set to null.ON DELETE NO ACTION (which is the default) prevents deleting a parent when there are children (would be nice arrangement for real life)
0 0
原创粉丝点击