2 ms·
> I did a deeper dive I learned that tree representations in SQL are a rabbit hole of insanity all arranged around referential integrity. It’s not crazy, just
by josteink 7y ago
> I did a deeper dive I learned that tree representations in SQL are a rabbit hole of insanity all arranged around referential integrity.
It’s not crazy, just impractical.
Trees are mostly represented the same way in memory, except you don’t have to access them in table-format, which admittedly for tree-data is very, very cumbersome.
- dekhn 7y agoI'm not sure what data structure/language environment you mean, but in programming languages, trees are normally represented using pointers (typically from the parent to the child and back). All of this literally goes back to hierarchical databases which were mostly replaces by relational databases for what appear to be mainly performance and implementation reasons.