Natural join if no common attributes

匆匆过客 提交于 2019-12-12 08:22:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!