문제

“Any relational algebra query that includes a natural join operator can also be expressed by an equivalent relational algebra query without a natural join operator”. Is it true or false

I am on the fence with this question, I feel as though it is loaded. I think it is true because:

(Natural join) Output pairs of rows from the two input relations

that have the same value on all attributes

that have the same name.

(Cartesian product) Output all pairs of rows from the two input

relations (regardless of whether or not they

have the same values on common attributes)

도움이 되었습니까?

해결책

Cartesian product on relations that have attributes of the same name is not a relational operator. The thing it would produce for say, relations {TUP {A 2}} and {TUP {A 4}} cannot ever be a relation.

Notwithstanding that, it is indeed possible to express natural join in terms of renaming plus cartesian product plus restriction plus projection.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top