I’m thinking whether the below use case example would be best applying Tree Pattern, what kind of tree pattern/s it might be.
State -> City -> Highway, each state has multiple cities, each city has multiple highways. However, my struggle with this kind of data is that highway might be part of multiple cities. The real application I ran into the hierarchy relationship between the child and parent can be changed more often than a highway to cities. Some examples of the model are like, A1 -> B1 -> C1, B1 -> C2, A2 -> B1 -> C2, A2 -> B3 -> C1. I can almost consider they are like graphs except for the A, B,C do show some kind of hierarchy and branching is more obvious than a random social network relation.
I saw some discussion in another topic. But it didn’t fully answer my concern about the reuse of the child branch or child node in the data.
Also, I was researching how to model graph-like data in MongoDB. Mostly findings suggest we shouldn’t model it in Mongo. I understand each kind of database has its strong suit. However, I’m kind of wondering what’s the solution (maybe not best) in Mongo.