SQL 教材错误整理

本文主要记录在阅读《数据库系统概论》过程中发现的错误。

本人水平有限,仅凭浅薄的知识和个人的理解纠错,欢迎批评指正!

P27

原文:

3 - (3)

关系模型的存取路径对用户透明,从而具有更高的数据独立性、更好的安全保密性,也简化了程序员的工作和数据库开发建立的工作。

问题:

存取路径对用户隐蔽,应该是不透明才对。

修改:

关系模型的存取路径对用户不透明,从而具有更高的数据独立性、更好的安全保密性,也简化了程序员的工作和数据库开发建立的工作。

P46

原文:

定义2.5 设 F 是基本关系 R 的一个或一组属性,但不是关系 R 的码,Ks 是基本关系 S 的主码。

问题:

在浙大的《数据库系统原理–陈岭》课程中,并没有出现诸如“但不是关系 R 的码”这种限制性描述。且此限制也与此页的 例 2.2 相违背。查阅其它资料后,也没有发现类似限制。

Foreign key - Wikipedia

A foreign key is a set of attributes in a table that refers to the primary key of another table. The foreign key links these two tables. Another way to put it: In the context of relational databases, a foreign key is a set of attributes subject to a certain kind of inclusion dependency constraints, specifically a constraint that the tuples consisting of the foreign key attributes in one relation, R, must also exist in some other (not necessarily distinct) relation, S, and furthermore that those attributes must also be a candidate key in S.[1][2][3] In simpler words, a foreign key is a set of attributes that references a candidate key. For example, a table called TEAM may have an attribute, MEMBER_NAME, which is a foreign key referencing a candidate key, PERSON_NAME, in the PERSON table. Since MEMBER_NAME is a foreign key, any value existing as the name of a member in TEAM must also exist as a person’s name in the PERSON table; in other words, every member of a TEAM is also a PERSON.

修改:

设 F 是基本关系 R 的一个或一组属性,Ks 是基本关系 S 的主码。