relational icon indicating copy to clipboard operation
relational copied to clipboard

Add theta-join binary operator

Open terencode opened this issue 4 years ago • 3 comments

In our course, we use the theta-join (θ-join) operator: https://en.wikipedia.org/wiki/Relational_algebra#%CE%B8-join_and_equijoin

terencode avatar Oct 08 '20 13:10 terencode

As I said to the other hundred of people who wrote about this: "If you have a good suggestion for the syntax of this operator, please tell me."

Right now relational has 2 kinds of operators:

  • binary: expr OP expr
  • unary: OP params (expr)

This operator would fit into its own new category and so far I've had no nice idea on how to implement the syntax and grammar. The implementation of the operator itself is trivial.

So far, nobody has ever come forward with a suggestion.

Until that happens, you can just do σ condition (A ⋈ B)

ltworf avatar Oct 08 '20 15:10 ltworf

Sorry if this was requested before, I didn't see anything about it in the documentation or closed issues.

Maybe you could implement it this way:

exp OP(cond) exp

terencode avatar Oct 08 '20 16:10 terencode

They normally ask for it via the survey button.

Hm, it could make sense to implement the syntax in that way.

ltworf avatar Oct 18 '20 19:10 ltworf