Behind a query, something like the following occurs:
Note that an RDBMS would just steps 1, 2, then execute directly.
Relational Algebra
Recall relational algebra operations:
Selection ($\sigma$)
Projection ($\pi$)
Rename ($\rho$)
Union ($\cup$)
MultipleInputFile
class - built-in unionDifference ($-$)
MultipleInputFile
Cartesian Product ($\times$)
SELECT table1...., table2.... FROM table1, table2
Aggregation
count, sum, min, max
Relational Joins Performing efficient joins are one of the harder problems with query and schema design.
Types of relationships in joins include one-to-one, one-to-many, and many-to-many - different strategies for each.