Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Relational algebra
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
=== Antijoin === The antijoin (β·), written as ''R'' β· ''S'' where ''R'' and ''S'' are [[relation (database)|relation]]s,{{efn|In [[Unicode]], the Antijoin symbol is β· (U+25B7).}} is similar to the semijoin, but the result of an antijoin is only those tuples in ''R'' for which there is ''no'' tuple in ''S'' that is equal on their common attribute names.<ref name=unnesting>{{Cite conference |title=Unnesting Arbitrary Queries |conference=BTW |last=Neumann |first=Thomas |url=https://dl.gi.de/handle/20.500.12116/2418 |year=2015 |doi=}}</ref> For an example consider the tables ''Employee'' and ''Dept'' and their antijoin: {{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 || Production |} {{col-break|gap=2em}} {| class="wikitable" |+ ''Dept'' |- ! DeptName !! Manager |- | Sales || Sally |- | Production || Harriet |} {{col-break|gap=2em}} {| class="wikitable" |+ ''Employee'' β· ''Dept'' |- ! Name !! EmpId !! DeptName |- | Harry || 3415 || Finance |- | George || 3401 || Finance |} {{col-end}} The antijoin is formally defined as follows: : {{math|1 =''R'' β· ''S'' = { ''t'' : ''t'' β ''R'' ∧ Β¬∃''s'' β ''S''(''Fun'' (''t'' ∪ ''s'')) }}} or : {{math|1 = ''R'' β· ''S'' = { ''t'' : ''t'' β ''R'', there is no tuple ''s'' of ''S'' that satisfies ''Fun'' (''t'' ∪ ''s'') }}} where {{math|''Fun'' (''t'' ∪ ''s'')}} is as in the definition of natural join. The antijoin can also be defined as the [[Complement (set theory)|complement]] of the semijoin, as follows: {{NumBlk|:| {{math|1=''R'' β· ''S'' = ''R'' − ''R'' β ''S''}} |{{EquationRef|5}}}} Given this, the antijoin is sometimes called the anti-semijoin, and the antijoin operator is sometimes written as semijoin symbol with a bar above it, instead of β·. In the case where the relations have the same attributes (union-compatible), antijoin is the same as minus.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Relational algebra
(section)
Add topic