sql之"table that is a parent of a referential integrity constraint"对于 oracle SQL 有什么作用
落叶无声
阅读:26
2025-02-15 21:57:57
评论:0
我正在准备 Oracle 1Z0-051 考试,我在 a question about DELETE/TRUNCATE
中阅读了这篇文章:
... table that is a parent of a referential integrity constraint ...
如果一个表是另一个具有参照完整性约束的表的“父表”,这意味着什么?
或者这可能是答案选择中的误报?
请您参考如下方法:
“父”和“子”通常用于描述一对多关系(任何类型,而不仅仅是数据库相关)中的两个表。一个“ parent ”有许多“ child ”(行)。
“父”是在外键约束中引用的表。
“子”是在外键约束中引用父项的表。
例如
create table customer ( -- the "parent"
id int,
...
primary key (id)
)
create table cart ( -- the "child"
id int,
customer_id int, -- the foreign key column
...
constraint foreign key (customer_id) references customer(id)
)
声明
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。