(no title)
balfirevic | 6 months ago
It's inspired by a mish-mash of both relational algebra and relational calculus, but the reason why SELECT comes first is because authors wanted it to read like English (it was originally called Structured English Query Language).
You can write the relational algebra operators in any order you want to get the result you want.
9rx|6 months ago
Ultimately, yes, you can express relational algebra in any notation that gets the point across, but the parent is right that
is what is commonly used. 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.balfirevic|6 months ago
Π(σ(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".