我正在努力完成斯坦福网站上的测验,这是关系代数迷你课程的一部分。它是这样的:
Consider a relation R(A,B) with r tuples, all unique within R, and a relation S(B,C) with s tuples, all unique within S. Let t represent the number of tuples in R natural-join S. Which of the following triples of values (r,s,t) is possible?
1. (5,10,250)
2. (5,10,500)
3. (2,3,9)
4. (2,10,0)谁能告诉我正确的解决方案,并解释为什么它是正确的解决方案?谢谢。
发布于 2015-08-10 13:26:28
自然联接产生的元组数量不能大于每个操作数中的元组数量的乘积。(Natural Join通常被描述为叉积上的过滤器,例如:https://en.wikipedia.org/wiki/Relational_algebra#Natural_join_.28.E2.8B.88.29。)
因此,这就排除了答案1.到3.,只剩下4.作为可能。
https://stackoverflow.com/questions/31708843
复制相似问题