2 ms·
i will admit that once I saw postgres has arrays and composite types, it seemed more natural to model this as NODE with array of CHILDREN. I think it's more ab
by dekhn 7y ago
i will admit that once I saw postgres has arrays and composite types, it seemed more natural to model this as NODE with array of CHILDREN.
I think it's more about the expressivity of pointers and arrays compared to the "backwardness-feeling" of index lookups.
- topmonk 7y agoSo now you have just created a many-to-many relationship. Due to a bug in software, a child could now be linked to multiple parents, or even no parents. Part of good database design is preventing corruption of these sorts of relationships. > I think it's more about the expressivity of pointers and arrays compared to the "backwardness-feeling" of index lookups. Greater expressivity in ways to store bad data is never a good thing.
- papln 7y agoHuh? If you have a tree with parent pointing to children, how do you get a child's parent? You need an index. Same as with a DB.