sql - C. J. Date 的 "SQL and Relational Theory"中的关系理论

标签 sql relational-algebra

我卡在了“SQL and Relational Theory”这本书的某一点上,它与关系属性可以采用的类型有关。问题是这样的:

There are exceptions to the rule that relational attributes can be of any type whatsoever, of which one is that if a relation R is of type T, then attributes of R cannot themselves be of type T.

为什么?是不是因为关系 R 的类型是“Relation [name]”,所以属性不能是这种类型?

最佳答案

考虑这样的事情:

create table address {
    id int,
    name varchar(20),
    details address -- the address relation has an attribute that is another of itself
}

定义 将无限递归。

关于sql - C. J. Date 的 "SQL and Relational Theory"中的关系理论,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13905691/

相关文章:

sql - PL/Python 错误 : NameError: global name 'name of user-defined function' is not defined

mysql - 为什么 LEFT JOINing 会使第二个表的 id 为 NULL?

mysql - LOAD 是关系代数运算符吗?

mysql - 无法正确连接 3 个表

java - 从 Java 进行数据处理的工具

sql - oracle - 案例陈述和分组依据

sql - 如何在 SQL 和关系代数中无论列顺序如何只列出每对元组一次?

sql - 将某个 SQL 查询转换为关系代数

sql - 关系代数和混淆一个复杂的例子

mysql - COUNT(*) 中不遵守 LEFT JOIN 条件