Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>I could have chosen a graph database, but for my level of complexity I just used postgres and a table that has foriegn-key relationships to itself.

Good point. Relational databases have been used for BOM (Bill-Of-Material) modelling (a manufacturing application) for ages. DB records representing a manufactured product or component can have fields that point to other record(s) in the same table, which can be child components of the product. E.g. airplane -> engine, wings. Engine -> engine parts. Wings -> wing parts. Etc. And this can be recursive.

Another such example is when you want to model an employee entity, where a manager (who has employees - or reports) is also an employee.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: