Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mongodb hierarchy

Posted on 2016-03-26
2
Medium Priority
?
86 Views
Last Modified: 2016-10-26
A newbie question: it seems that mongo does not by default describe a hierarchical structure. So if i were using something like xpath in xml, i could find the parents of a giving node. Am i correct in thinking that you need to 'build-in' tree-like relationships (with say 'parent') to be able to do that?
0
Comment
Question by:CEHJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
James Bilous earned 2000 total points
ID: 41860726
In MongoDB you can use "categories" to automatically implement this sort of behavior. See:

https://docs.mongodb.com/v3.2/tutorial/model-tree-structures-with-parent-references/
0
 
LVL 86

Author Closing Comment

by:CEHJ
ID: 41860870
Great
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question