Here’s a table (ha!) of what SQL and relational algebar operations correspond to
In this table,
t is a variable holding a
table array, and
some indexing expression.
|OUTER JOIN||OUTER JOIN|
|FROM ||Cartesian product|
Note that there is one big difference between relational algebra and SQL & Octave
table: Relations in relational algebra are sets, not lists.
There are no duplicate rows in relational algebra, and there is no ordering.
So every operation there does an implicit
unique() on its
results, and there‘s no
sort(). This is not the case in SQL
Note for users coming from Matlab: Matlab does not provide a general
function. Instead, you have to variously use
groupsummary, and manual code to accomplish “group by” operations.
Note: I wrote this based on my understanding of relational algebra from reading C. J. Date books. Other people’s understanding and terminology may differ. - apjanke