To separate content object and the data by its location in the hierarchy?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
It sounds probably not clear so I will explain:

Suppose we have a tree of comments (Nested Sets or something, in principle, not important). Whether to make a field not related directly to comments (lft, rgt, parent_id, etc.) in a separate database table? On the one hand, we get rid of the binding to a specific structure of the review (you can always change NS to MP or something else), and with another — have difficulty with the Union of these tables.
by | 4 views

2 Answers

0 like 0 dislike
I think the question posed is wrong. The basis is a tree, not comments. IMHO, the tree is stored separately. For the above reason and further, you never know what else you want to stick in, it will be easier to do it with a clear wood than it. And the difficulty joyname there should be no...
by
0 like 0 dislike
Only for reviews (or other similar objects are United in hierarchy), IMHO, is not only unnecessarily increase the complexity when it is necessary to change the structure, then change it, may not will need, and may need to make multiple hierarchies.
\r
Another thing, if the United hierarchy of heterogeneous objects, or one object can be part of different hierarchies — there is definitely (if not, the question is denormalization with the aim of increasing performance) the objects separately of the hierarchy separately, can also metadata make sense to endure. In General, for hierarchy makes sense, IMHO, to look towards NoSQL.
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
0 like 0 dislike
4 answers
asked Mar 21, 2019 by Dair_Targ
110,608 questions
257,186 answers
0 comments
27,902 users