@instablog9ja This is just content
After all many people were eagerly waiting for this kinds of moments so they can finally confirm that their initial thoughts of "peller made a mistake marrying Jarvis" is true
The lesson
The better question is, "What trade-off am I willing to make?β Adjacency lists and MPTT solve the same problem differently. Good backend engineering is knowing why you chose one.
Your database hierarchy might be designed wrong.
There are multiple ways to store trees in a relational database.
Two common ones:
Adjacency Lists vs MPTT
And choosing the wrong one can hurt your application later.
So which one wins?
Neither.
And this is where database engineering gets interesting.
If your hierarchy changes frequently:
> Adjacency List
If your hierarchy is relatively stable and you constantly query branches:
> MPTT
It depends on workload