问题
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-product (Cartesian operator)?
回答1:
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.
回答2:
A cartesian product of two tables will be returned.This is because when we perform any JOIN operation on two tables a cartesian product of those tables is performed and then based on any select condition in WHERE clause the resultant rows are returned.But here as there are no common columns the process stops after cartesian product.
回答3:
it will return the cartesian product of the tables.if there will be a common attribute then natural join removes duplicacy of common attribute
来源:https://stackoverflow.com/questions/14548543/natural-join-if-no-common-attributes