Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Relational algebra
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Full outer join ==== The '''outer join''' (β) or '''full outer join''' in effect combines the results of the left and right outer joins. The full outer join is written as ''R'' β ''S'' where ''R'' and ''S'' are [[relation (database)|relation]]s.{{efn|In [[Unicode]], the Full Outer join symbol is β (U+27D7).}} The result of the full outer join is the set of all combinations of tuples in ''R'' and ''S'' that are equal on their common attribute names, in addition to tuples in ''S'' that have no matching tuples in ''R'' and tuples in ''R'' that have no matching tuples in ''S'' in their common attribute names.{{citation needed|date=April 2022}} For an example consider the tables ''Employee'' and ''Dept'' and their full outer join: {{col-begin|width=auto; margin:0.5em auto}} {{col-break}} {| class="wikitable" |+ ''Employee'' |- ! Name !! EmpId !! DeptName |- | Harry || 3415 || Finance |- | Sally || 2241 || Sales |- | George || 3401 || Finance |- | Harriet || 2202 || Sales |- | Tim || 1123 || Executive |} {{col-break|gap=2em}} {| class="wikitable" |+ ''Dept'' |- ! DeptName !! Manager |- | Sales || Harriet |- | Production || Charles |} {{col-break|gap=2em}} {| class="wikitable" |+ ''Employee'' β ''Dept'' |- ! Name !! EmpId !! DeptName !! Manager |- | Harry || 3415 || Finance || Ο |- | Sally || 2241 || Sales || Harriet |- | George || 3401 || Finance || Ο |- | Harriet || 2202 || Sales || Harriet |- | Tim || 1123 || Executive || Ο |- | Ο || Ο || Production || Charles |} {{col-end}} In the resulting relation, tuples in ''R'' which have no common values in common attribute names with tuples in ''S'' take a ''null'' value, ''Ο''. Tuples in ''S'' which have no common values in common attribute names with tuples in ''R'' also take a ''null'' value, ''Ο''. The full outer join can be simulated using the left and right outer joins (and hence the natural join and set union) as follows: :''R'' β ''S'' = (''R'' β ''S'') ∪ (''R'' β ''S'')
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)