Join¶
Join operator *
¶
The Join operator A * B
combines the matching information in A
and B
.
The result contains all matching combinations of entities from both arguments.
Principles of joins¶
The operands
A
andB
must be join-compatible.The primary key of the result is the union of the primary keys of the operands.
Examples of joins¶
Example 1 : When the operands have no common attributes, the result is the cross product – all combinations of entities.
Example 2 : When the operands have common attributes, only entities with matching values are kept.
Example 3 : Joining on secondary attribute.
Properties of join¶
When
A
andB
have the same attributes, the joinA * B
becomes equivalent to the set intersectionA
∩B
. Hence, DataJoint does not need a separate intersection operator.Commutativity:
A * B
is equivalent toB * A
.Associativity:
(A * B) * C
is equivalent toA * (B * C)
.