Question

“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)

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top