This is no longer maintained and has been superseded by datajoint-company/datajoint-docs. Please file new issues there (or help contribute!). We are currently migrating and generating new content until December 2022 after which we’ll be decomissioning https://docs.datajoint.org and https://tutorials.datajoint.org in favor of https://datajoint.com/docs/.
The Join operator
A * B combines the matching information in
The result contains all matching combinations of entities from both arguments.
Principles of joins¶
Bmust 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¶
Bhave the same attributes, the join
A * Bbecomes equivalent to the set intersection
B. Hence, DataJoint does not need a separate intersection operator.
A * Bis equivalent to
B * A.
(A * B) * Cis equivalent to
A * (B * C).