Why to use django-cte-trees over treebeard
Closed this issue · 1 comments
There is discussion of when NOT to use django-cte-trees
, but what are the advantages of django-cte-trees
over treebeard
or django-mptt
?
It looks like treebeard currently has three modes of operation: https://tabo.pe/projects/django-treebeard/docs/1.60/api.html
The biggest advantage is that corrupted trees are not possible with cte-trees because no information is duplicated as is the case with the implementation of nested sets and materialized paths in treebeard and mptt.
They are not possible with treebeard's AL_Node either, but the performance will be worse with AL_Node if you're doing queries on the tree structure.
Of course the downside is that the implementation of django-cte-tree only supports PostgreSQL right now (some other databases also support recursive queries, but support isn't implemented right now)