🌱 Tim's Dev Wiki

Search IconIcon to open search

SQL

Last updated May 1, 2023.

TODO.

# Joins

# Join Algorithms

Join algorithms are the algorithms used to join two tables’ rows on a shared column to produce a resultant table.

There are several join algorithms, but this is a simple join algorithm called the nested loop join:

1
2
3
4
5
6
result_table = {}
for outer_row in outer_table:
    for inner_row in inner_table:
        if same_join_col_val(inner_row, outer_row):
            combined_row = inner_row + outer_row
            result_table.upsert(combined_row)