The four different versions of the join can be materialized using the following scripts:
Join-R1-R2.sql, Join-R1-sR2.sql, Join-sR1-R2.sql, Join-sR1-sR2.sql