Managing nested sets of data
I have been reading about storing nested data and the examples i have come across so far demonstrate on how one can create and manage an hierarchy of nodes in a database table when using the nested set model.I am wondering 开发者_JAVA百科if a table(parent) can have children tables(nodes).By table i mean the ordinary mysql table with data of course.
If you use nested sets, I don't see how you could distribute the data between different tables in a advantageous way. The thing with nested sets is that there are no so called parent and children elements. There are just nodes and every node can be a parent and/or a child. Where would you draw the line? Store the first three levels in one table and the rest in another. Doesn't sound very good to me. Nested sets are not really human readable when stored in a flat database because of the inherent structural difference between tables and hierarchies.
精彩评论