Last answered:

05 Oct 2022

Posted on:

30 Sept 2022

0

Is this hard core rule that left and right join are perfectly one to many relationship???

I ask this because while we interchange Departments_dup and dept_manager_dup table in left join than how this relationship gone be one to many. This must be many to one after interchange

2 answers ( 0 marked as helpful)
Posted on:

01 Oct 2022

1

I think it's not a hard rule. However, the lecture present that when we have two tables A and B, then A LEFT JOIN B would be exactly the same as B RIGHT JOIN A. Hence, dept_manager_dup LEFT JOIN departments_dup and the interchanged position of tables in departments_dup RIGHT JOIN dept_manager_dup are both many-to-one relationship (with respect to dept_manager_dup being on the left side of the relation).

I created a chart for reference. You can see that in both joins, dept_manager_dup is the highlighted area.
image.png

Kind regards,
Carl

Instructor
Posted on:

05 Oct 2022

0

Hi Mayank and Carl!
Thanks for reaching out.

@: Carl
Thanks for sharing this piece of information with the Community!

@: Mayank
It is not a rule, it depends on the task. You have to define the case of the task and decide the appropriate relationship.

Hope this helps.
Best,
Tsvetelin

Submit an answer