⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’

Excalidraw Data

Text Elements

JOIN vs. traversal: “friends of friends of Anna”

Relational

friendship person|friend 1 | 4 1 | 9 4 | 17 9 | 23 … | … (11 698 rows)

index (B-tree)

index (B-tree)

1

2

every hop = search the index again cost grows with table size: O(log n) per hop and intermediate rows multiply

Graph

Anna

David

Lea

Max

Tina

Ivan

every node knows its neighbours (index-free adjacency) cost grows with the part you visit: O(1) per hop

SQL asks “which rows match?” — a graph walks “where can I go from here?”