Storing deep hierarchies in a database
Introducing nested sets: part one
6 min readOct 2, 2020
The problem we’re trying to solve
Relational databases are great for storing a classic parent/child relationship. Take the example of continents:
continent
id name
1 Europe
2 America