ltworf / relational

Educational tool for relational algebra
https://ltworf.codeberg.page/relational/
GNU General Public License v3.0
91 stars 18 forks source link

Add theta-join binary operator #48

Open terencode opened 3 years ago

terencode commented 3 years ago

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

ltworf commented 3 years ago

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:

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)

terencode commented 3 years ago

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
ltworf commented 3 years ago

They normally ask for it via the survey button.

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