Join when multiple tuples could be concatenated

43 Views Asked by At

I am not quite sure how exactly join behaves.

From what I learned $A\Join_{x=y}B$ means iterating through every tuple $a$ in $A$ and if there is a tuple $b$ in $B$ for which $a_x=b_y$ concatenate both tuples. The join operation is a set containing all of those concatenated tuples.

So for instance I have
$A=\{(1, "Smith"),(2, "Williams"), (4, "Brown")\}$ and
$B=\{(1, "Emma"), (2, "Lucas"), (3, "Liam")\}$
In this case $A\Join_{1=1}B=\{(1, "Smith", 1, "Emma"), (2, "Willams", 2, "Lucas")\}$

But now I don't know what happens if there are more than $1$ tuples in $B$ for which this is the case.

Lets say that I have
$A=\{(1, "Smith"), (2, "Williams")\}$ and
$B=\{(1, "Emma"), (2, "Lucas"), (1, "Liam")\}$
and I want to have is $M=A\Join_{1=1}B$, what would $M$ be?

1

There are 1 best solutions below

0
On

Concatenation { (1,S), (2,W), (3,E), (4,Lu), (5,Li) }.
Join { (1,S), (2,W), (3,E), (1,Lu), (2,Li) }.

Your description of join is too vauge to grasp.
Would you explain the concatenation part?