1,420 views
2 votes
2 votes
what is difference between full outer join and cross product?

1 Answer

1 votes
1 votes

No: the Cartesian product is not the same as SQL FULL OUTER JOIN.

For example: if A = {1,2} and B = ∅, then A × B = {1,2} × ∅ = ∅, i.e. the Cartesian product yield the empty set. But, since FULL OUTER JOIN does not require each record in the two joined tables to have a matching record, if B is empty and A is not, FULL OUTER JOIN will still return some rows.

However, CROSS JOIN will return the Cartesian product of rows from tables in the join.

Source: https://math.stackexchange.com/questions/668885/is-cartesian-product-same-as-sql-full-outer-join

Related questions

1 votes
1 votes
2 answers
1
aditi19 asked May 8, 2019
1,262 views
Suppliers(sid, sname, address)Parts(pid, pname, color)Catalog(sid, pid, cost)Find the pids of the most expensive parts supplied by suppliers named Yosemite Sham
0 votes
0 votes
0 answers
2
0 votes
0 votes
0 answers
3
kumar.dilip asked Oct 27, 2018
540 views
Online Site For practicing Relational Algebrahttps://dbis-uibk.github.io/relax/calc.htm
2 votes
2 votes
1 answer
4
learner_geek asked Dec 3, 2017
1,728 views
Consider the relations r1(P, Q, R) and r2(R, S, T) with primary keys P and R respectively. The relation r1 contains 2000 tuples and r2 contains 2500 tuples. The maximum s...