ThetaJoins
Theta joins are a relational operation that combines tuples from two relations, R and S, when a predicate θ involving attributes from both relations evaluates to true. The predicate can be any comparison operator, including equality, inequality, or other comparisons such as <, >, <=, >=, and <>. When θ is strictly equality, the operation is typically called an equijoin; theta join encompasses equijoins as well as non-equality conditions.
Formally, the theta join R ⨝_θ S yields the set of all concatenated tuples (r, s) where r
In practice, theta joins can be implemented as a cross product followed by a selection, or directly
Applications of theta joins include non-equijoins required for range constraints, time-based joins, and spatial or value-based