Hacker News new | ask | show | jobs
by 9rx 309 days ago
> You can write the relational algebra operators in any order you want

Ultimately, yes, you can express relational algebra in any notation that gets the point across, but the parent is right that

   π₁(R)
is what is commonly used.

   (R)π₁
not so much. Even Codd himself used the former notation style in his papers, even though he settled on putting the relation first in his query language.
1 comments

My impression was the parent poster was talking about order of operations like projection and selection, where you might more commonly write:

Π(σ(R)) instead of σ(Π(R))

and not about whether relational algebra uses prefix or postfix notation:

Π(σ(R)) vs. R > σ > Π

SQL's WHERE statement (and others) works totally differently from SELECT in that regard, so it doesn't make much sense to say that "SELECT comes first because relational algebra".