小孩支气管炎吃什么药| 忌廉是什么东西| 14k是什么意思| 12月7日是什么星座| 吃什么容易胖起来| 杵状指见于什么疾病| 俄罗斯乌克兰为什么打仗| 梦到吃肉是什么意思周公解梦| 什么言什么色| 身强力壮是什么生肖| 什么为笑| cr是什么检查| 逝者如斯夫什么意思| 吃什么有助于骨头愈合| 重听是什么意思| 心率高吃什么药| 调理内分泌失调吃什么药效果好| 丹毒用什么抗生素| 优甲乐是治什么病的| 喝酒喝吐了用什么缓解| 怀孕两天会有什么反应| 月亮为什么会发光| 灵芝长什么样子| 老鼠疣长什么样子图片| 梦见死去的朋友是什么意思| 面瘫看什么科室好| 心理障碍是什么病| 柚子什么时候成熟| 漱口杯什么材质好| 此刻朋友这杯酒最珍贵是什么歌| 肠梗阻吃什么药| 8月19日是什么星座| 乳腺增生的前兆是什么| 1221是什么星座| 为什么会无缘无故长痣| 鼻窦炎吃什么药好得快| 什么的西瓜| 孩子铅高有什么症状| 梦见厕所是什么预兆| 发烧吃什么药退烧快| 洗头什么时间洗最好| 赵云的坐骑是什么马| 吃阿胶对女人有什么好处| 答谢宴是什么意思| 36朵玫瑰花代表什么意思| 卵巢多囊症是什么原因造成| 铜锣湾有什么好玩的| 乙肝两对半45阳性是什么意思| 天津市市长什么级别| 夹心饼干是什么意思| 朕是什么时候开始用的| 71年的猪是什么命| 熊吃什么食物| 啮齿类动物什么意思| 体重什么时候称最准确| 尿气味很重是什么原因| 卵巢早衰检查什么项目| 云南白药里的保险子有什么作用| 胃胀反酸吃什么药效果好| 夫妻肺片有什么材料| 大腿外侧是什么经络| 乳晕是什么意思| 小苏打可以用什么代替| 自由行是什么意思| 10月份是什么星座的| 后脑勺胀痛什么原因| 敖包是什么意思| 户籍地址是什么| 黄精和什么煲汤好| 血痣是什么原因引起的| 胶原蛋白是什么东西| 龟头责是什么意思| 早上7点是什么时辰| 朋友的反义词是什么| 食指长痣代表什么| 引产什么意思| 今天适合穿什么衣服| 5.7是什么星座| 咽后壁淋巴滤泡增生吃什么药| 磊字五行属什么| 木须肉为什么叫木须肉| 大学什么时候开始收费| 什么生水| 食管炎是什么原因引起的| 重楼有什么功效| 花中西施指的是什么花| 女性什么时候绝经| 梅毒是什么症状图片| 尿毒症有什么症状| 牛拉稀用什么药最快| 肉松可以做什么美食| 人的价值是什么| 料理机是干什么用的| 维生素d缺乏吃什么药| 什么叫埋下伏笔| py什么意思| 室性早搏吃什么药最好| 间断性是什么意思| move什么意思| 专硕和学硕有什么区别| 精液为什么是苦的| 吐槽是什么意思| 头疼想吐是什么原因引起的| 7月30号什么星座| 压测是什么意思| 最近发胖过快什么原因| 最贵的榴莲是什么品种| 新生儿什么时候剪头发| 做肠胃镜挂什么科| 7.2是什么星座| 牡丹是什么植物| 寓教于乐什么意思| 马齿苋有什么作用| 红景天是什么药| 什么叫佛系| 玛瑙是什么| 千金是什么生肖| furk是什么意思| 造口是什么意思| 手指关节痛挂什么科| 5岁属什么| 属龙女和什么属相最配| 烫伤用什么药膏好| 什么蔬菜补钾| 狗肉和什么一起炖最佳| 什么是性生活| 院子里有蛇是什么征兆| 香港的别称是什么| 女人肾虚吃什么补回来| 三竖一横念什么| 尿检白细胞阳性是什么意思| 鳄鱼属于什么动物| 成人改名字需要什么手续| 电器火灾用什么灭火器| 血小板为0意味着什么| 1度房室传导阻滞是什么意思| 教义是什么意思| 1959年是什么年| 收悉是什么意思| 乳头为什么是黑的| 首重是什么意思| 女人胯骨疼是什么原因| 胆碱酯酶高是什么意思| 淡盐水是什么水| 智齿什么时候拔最好| 乙肝病毒表面抗体阳性是什么意思| congee是什么意思| 7月28日什么星座| 中暑喝什么好| 喜欢吃酸的人是什么体质| 三点水加分念什么| 广东菜心是什么菜| 8月15日是什么星座| 5月31日什么星座| 生肖猪和什么生肖相冲| 优质是什么意思| 捞面条配什么菜好吃| 茉莉龙珠是什么茶| 内蒙古代叫什么| 蒟蒻是什么| 七星瓢虫吃什么食物| 孩子高低肩有什么好办法纠正| 牛什么饭| 精液是什么颜色| 今日立冬吃什么| 叶酸片什么时候吃合适| 尾牙是什么意思| 癫痫挂什么科| 1996是什么年| 舌裂纹是什么原因| 不知为什么| dwi是什么意思| 护士需要什么学历| 血压偏高喝什么茶| 尿液细菌高是什么原因| 2月23号是什么星座| 开心是什么意思| 劳燕分飞是什么意思| 37岁属什么的生肖| rj什么意思| 汗血宝马什么意思| dha什么时候吃最好| 做梦来月经了什么预兆| 88是什么意思| nuxe是什么牌子护肤品| 禁锢是什么意思| 晚上难入睡是什么原因| 男人纹身纹什么运气好| 手抖是什么原因| herb是什么意思| 10月16是什么星座| 绞股蓝有什么功效| 牙齿痛吃什么| 乳糖不耐受吃什么奶粉好| 强高是什么意思| 近视手术有什么后遗症| 鼻窦炎吃什么药效果好| 视力s和c代表什么| 为什么不来大姨妈也没有怀孕| 老人大便失禁是什么原因| dx是什么药| 山竹不能和什么一起吃| 尿酸ua偏高是什么意思| 超声检查是什么| 火龙果什么时候吃最好| 训练有素是什么意思| 螺蛳粉为什么叫螺蛳粉| 什么东西越晒越湿| 王允和貂蝉什么关系| 失眠看什么科最好| 嘴唇有痣代表什么| 布洛芬是什么药| crp高是什么意思| 举足轻重是什么意思| 吕布的武器是什么| 黄色是什么颜色组成的| 白血病是什么症状| 吃什么能生精和提高精子质量| 什么是跨性别者| 觊觎什么意思| 八面玲珑什么生肖| cache什么意思| 茵陈是什么植物| 温暖的近义词是什么| 白细胞wbc偏高是什么意思| versace什么牌子| 棕色和什么颜色搭配好看| sweat是什么意思| 为什么得疱疹病毒| 黄瓜生吃有什么好处| 菊花茶适合什么人喝| 男怕穿靴女怕戴帽什么意思| 柔软的什么| 明天代表什么生肖| 目字旁与什么有关| 血红蛋白高是什么原因| 慌张的近义词是什么| 安然无恙是什么意思| 胃绞疼是什么原因| 脑卒中什么意思| 谷丙转氨酶高吃什么药可以降下来| 过敏性紫癜看什么科| 口周皮炎用什么药膏| 看男性性功能挂什么科| 1987属什么生肖| 攻是什么意思| 小病不治下一句是什么| 不骄不躁是什么意思| 为什么不能空腹喝豆浆| 兰花是什么颜色| 肛裂是什么样子的图片| 脚心有痣代表什么意思| 类风湿是什么意思| 吃辣椒过敏是什么症状| 羡煞旁人是什么意思| 苯丙氨酸是什么| 忘年恋是什么意思| 没事在家可以做些什么| 丙氨酸氨基转移酶是什么意思| 农历五月二十四是什么日子| 什么叫青光眼| 精忠报国是什么生肖| ha是什么单位| 喝醉是什么感觉| 百度Jump to content

廊坊市:奋力打好全国文明城市创建百日攻坚战

From Wikipedia, the free encyclopedia
An example of a database that has not enforced referential integrity. In this example, there is a foreign key (artist_id) value in the album table that references a non-existent artist — in other words there is a foreign key value with no corresponding primary key value in the referenced table. What happened here was that there was an artist called "Aerosmith", with an artist_id of 4, which was deleted from the artist table. However, the album "Eat the Rich" referred to this artist. With referential integrity enforced, this would not have been possible.
百度 按照规划,今年将有100台氢燃料电池轻客行驶在园区内,提供绿色出行服务。

Referential integrity is a property of data stating that all its references are valid. In the context of relational databases, it requires that if a value of one attribute (column) of a relation (table) references a value of another attribute (either in the same or a different relation), then the referenced value must exist.[1]

For referential integrity to hold in a relational database, any column in a base table that is declared a foreign key can only contain either null values or values from a parent table's primary key or a candidate key.[2] In other words, when a foreign key value is used it must reference a valid, existing primary key in the parent table. For instance, deleting a record that contains a value referred to by a foreign key in another table would break referential integrity. Some relational database management systems (RDBMS) can enforce referential integrity, normally either by deleting the foreign key rows as well to maintain integrity, or by returning an error and not performing the delete. Which method is used may be determined by a referential integrity constraint defined in a data dictionary.

The adjective 'referential' describes the action that a foreign key performs, 'referring' to a linked column in another table. In simple terms, 'referential integrity' guarantees that the target 'referred' to will be found. A lack of referential integrity in a database can lead relational databases to return incomplete data, usually with no indication of an error.

Formalization

[edit]

An inclusion dependency over two (possibly identical) predicates and from a schema is written , where the , are distinct attributes (column names) of and . It implies that the tuples of values appearing in columns for facts of must also appear as a tuple of values in columns for some fact of .

Such constraint is a particular form of tuple-generating dependency (TGD) where in both the sides of the rule there is only one relational atom.[3] In first-order logic it is expressible as , where is the vector (whose size is ) of variables shared by and , and no variable appears multiple times neither in the TGD's body nor in its head.

Logical implication between inclusion dependencies can be axiomatized by inference rules[4]:?193? and can be decided by a PSPACE algorithm. The problem can be shown to be PSPACE-complete by reduction from the acceptance problem for a linear bounded automaton.[4]:?196? However, logical implication between dependencies that can be inclusion dependencies or functional dependencies is undecidable by reduction from the word problem for monoids.[4]:?199?

Declarative referential integrity

[edit]

Declarative referential integrity (DRI) is one of the techniques in the SQL database programming language to ensure data integrity.

Meaning in SQL

[edit]

A table (called the referencing table) can refer to a column (or a group of columns) in another table (the referenced table) by using a foreign key. The referenced column(s) in the referenced table must be under a unique constraint, such as a primary key. Also, self-references are possible (not fully implemented in MS SQL Server though[5]). On inserting a new row into the referencing table, the relational database management system (RDBMS) checks if the entered key value exists in the referenced table. If not, no insert is possible. It is also possible to specify DRI actions on UPDATE and DELETE, such as CASCADE (forwards a change/delete in the referenced table to the referencing tables), NO ACTION (if the specific row is referenced, changing the key is not allowed) or SET NULL / SET DEFAULT (a changed/deleted key in the referenced table results in setting the referencing values to NULL or to the DEFAULT value if one is specified).[6]

Product-specific meaning

[edit]

In Microsoft SQL Server the term DRI also applies to the assigning of permissions to users on a database object. Giving DRI permission to a database user allows them to add foreign key constraints on a table.[7]

See also

[edit]

References

[edit]
  1. ^ Chapple, Mike. "Referential Integrity". About.com Tech. About.com. Retrieved 2025-08-05. Definition: Referential integrity is a database concept that ensures that relationships between tables remain consistent. When one table has a foreign key to another table, the concept of referential integrity states that you may not add a record to the table that contains the foreign key unless there is a corresponding record in the linked table.
  2. ^ Coronel et al. (2013). Database Systems 10th ed. Cengage Learning, ISBN 978-1-111-96960-8
  3. ^ Kolaitis, Phokion G. "A Tutorial on Database Dependencies" (PDF). University of California Santa Cruz & IBM Research - Almaden. Retrieved 2025-08-05.
  4. ^ a b c Abiteboul, Serge; Hull, Richard B.; Vianu, Victor (1994). "9. Inclusion Dependency". Foundations of Databases. Addison-Wesley. pp. 192–199.
  5. ^ Microsoft Support (2025-08-05). "Error message 1785 occurs when you create a FOREIGN KEY constraint that may cause multiple cascade paths". microsoft.com. Retrieved 2025-08-05.
  6. ^ ANSI/ISO/IEC 9075-1:2003, Information technology—Database languages—SQL
    • Part 1: Framework (SQL/Framework)
    • Part 2: Foundation (SQL/Foundation)
  7. ^ Chigrik, Alexander (2025-08-05). "Managing Users Permissions on SQL Server". Database Journal. Retrieved 2025-08-05.
[edit]
股票填权是什么意思 湿寒吃什么中成药 什么是磁共振 烙馍卷菜搭配什么菜 一什么手表
养精蓄锐是什么意思 隐疾是什么意思 孕妇贫血吃什么补血最好 什么叫制动 属鸡的幸运色是什么颜色
没有淀粉可以用什么代替 尿崩症吃什么药最有效 性激素六项什么时候查 右眼流泪是什么原因 粽子叶子是什么叶子
梦见狗咬手是什么意思 小子是什么意思 梅毒rpr是什么 怀孕初期分泌物是什么样的 河豚有毒为什么还吃
小孩睡觉磨牙是什么原因引起的hcv8jop9ns6r.cn 纤维硬结灶是什么意思hcv8jop9ns3r.cn 蹲不下去是什么原因hcv8jop6ns9r.cn 蔷薇色是什么颜色hcv8jop1ns8r.cn 拉水吃什么药helloaicloud.com
上热下寒吃什么食物好hcv8jop7ns3r.cn 为什么会得乙肝hcv9jop0ns7r.cn pgi2在医学是什么意思hcv8jop0ns0r.cn 腰痛是什么原因引起的hcv8jop6ns4r.cn 干咳是什么病的前兆hcv8jop3ns8r.cn
1月17日是什么星座hcv8jop6ns2r.cn 什么人群不适合吃阿胶糕hcv7jop9ns8r.cn 绿茶什么时候喝最好hcv8jop5ns8r.cn 哈乐是什么药hcv9jop2ns6r.cn 09年属什么hcv8jop5ns8r.cn
耳语是什么意思hcv7jop6ns9r.cn 生殖科是检查什么的hcv8jop3ns6r.cn 鱼油什么人不能吃luyiluode.com 舌苔腻是什么意思hcv8jop6ns2r.cn 老日念什么hcv8jop3ns5r.cn
百度