Hacker News new | past | comments | ask | show | jobs | submit login

Sets and relations are indeed the most richest metamodel but most of the time a dag (directly acyclic graph) is enough : object can be connected to many parents but it keeps most the hierarchical organisation, which is easier to model.



What can be modelled as a graph can be modelled as sets and relations and vice versa; they're both equally powerful. But just as any two Turing-complete languages are equally powerful, the discussion doesn't end there.

It's still the same problem: you have mixed the logical model and physical structure of your data together. You are privileging one view of the data over all other views.

I consider switching to a full graph model a complicated workaround for the limitations of trees. You now introduce new and exciting paradoxes and you will need to litter your code with special cases (B means C, but only when A is not an ancestor, otherwise it means D). Ask C++ programmers about the joys of multiple inheritance.

In some cases the logical model is a graph and in those cases you should absolutely model it as a graph. But modelling all problems as a graph is inadvisable.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: