I'm not only a Bash guy: I really like databases too!
If you need a formal introduction to relational algebra here is a presentation on the topic by the great Pr. Jeffrey D. Ullman:
http://infolab.stanford.edu/~ullman/fcdb/aut07/slides/ra.pdf
Pay special attention to:
- pp11-14 describing the product ("CROSS JOIN" in SQL) theta-join ("JOIN ... USING" or "JOIN ... ON" in SQL)
- pp29-31 explaining the core difference between genuine relational algebra and SQL (set vs. bag algebra)