关系完整性和引用完整性是一回事吗? [英] Are relational integrity and referential integrity the same thing?

查看:126
本文介绍了关系完整性和引用完整性是一回事吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现引用和关系完整性的定义相同.他们是一样的吗?我已经分别研究了这两个术语,但找不到任何好的定义.

I found the same definition for referential and relational integrity. Are they the same? I have researched the two terms separately but cannot find any good definitions.

推荐答案

是的,它们是同一回事.不过,术语参照完整性"的使用更多.

Yes, they are the same thing. The term "Referential Integrity" is used much more though.

引用完整性与关系数据库中的外键有关.为了使表具有参照完整性,外键必须为null或引用相关表中的现有PK值.

Referential Integrity relates to Foreign Keys in a Relational DB. For a table to exhibit Referential Integrity, the Foreign Key must either be null or reference an existing PK value in the related table.

这篇关于关系完整性和引用完整性是一回事吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆