Reputation: 1235
What will natural join return in relational algebra if tables don't have attributes with same names? Will it be null or the same as cross join (cross product) (Cartesian product)?
Upvotes: 24
Views: 26127
Reputation: 3134
The cartesian product of the two tables will be returned. This is because, when we perform any JOIN operation on two tables, a cartesian product of those tables is formed. Then, based on any select condition in the WHERE clause, the resultant rows are returned. But here, as there are no common columns, the process stops after finding the cartesian product.
Upvotes: 9
Reputation: 1
It will return the cartesian product of the tables. If there are any common attributes, then the natural join removes the duplicate attributes.
Upvotes: -1
Reputation: 5741
If there are no attributes in common between two relations and you perform a natural join
, it will return the cartesian product
of the two relations.
Upvotes: 32