Hierarchical Structures in PostgreSQL (2020)

It’s a common pattern: a database developer at a startup is probably on the Product subteam of the Engineering team at their company. In a department store, shoes are a subcategory of clothing, while your favorite thermos is probably in the travel department.

In any Github organization, there are teams within teams within teams. In any large department store there are categories deeply nested. In any recipe book, there are many ways to classify food.

So how can we model them?

Jake (my boyfriend) and I have been exploring relational database concepts out of interest and pure geekery. This was a fun problem that I gave him and we got to work it out together. It was so fun we wanted to share! We won’t beat the bush around with PostgreSQL installation, security, setup, blah blah at this time, let’s just have some pure database fun for a few minutes!

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

2 Likes