Adjacency list vs. nested set — explore the same org chart two ways.
parent_id
lft
rgt
Company [1, 18] · depth 0 ├── Engineering [2, 9] · depth 1 │ ├── Backend [3, 6] · depth 2 │ │ └── API Team [4, 5] · depth 3 │ └── Frontend [7, 8] · depth 2 └── Operations [10, 17] · depth 1 ├── HR [11, 12] · depth 2 └── Finance [13, 16] · depth 2 └── Payroll [14, 15] · depth 3