title: Representing a rootless Tree/chart/hierarchy in a database
body: <p>There seem to be several good options to represent hierarchical data in a database, most popular apparently beeing the tree traversal algorithms.</p>
  <p>Another option that would probably work in my case is to do it recursively. This could involve saving the parent-id and going from there - though this too needs some sort of direction.</p>
  <p>Right now I have a problem where I have a set of items which can be characterized by a chart of connections, yet there is no root and not necessarily a starting point. For example it may happen that items loop around themselves so the ordering is only element per element and not complete. Wether or not the ordering is &quot;parent&quot; or &quot;child&quot; depends on which direction you start in, so to say.<br />
  Additionally, each connection should be characterizable by several properties, so the connections need to be identifyable somehow.<br />
  Here is an example though note that it is only a small example but you can already see that a simple traversal algorithm might start at 254 but then from going to 203 to 162 then 254 is actually the child to 162 - which maybe a problem (I am far from beeing a cs major so I honestly don't know)
  <img src="https://i.stack.imgur.com/RPvKm.png" alt="example" /></p>
  <p>Another thing is that I am limited to Access, which means I am pretty much limited to your standard SQL commands without recursiveness or functions in SQL.<br />
  For example many algorithms in SQL that convert to a Left/Right traversal tree on the fly do not work with Access SQL.<br />
  I have a large interest in solving this without much dependence on VBA as well.</p>
  <p>As far as performance goes, I expect less that 5000 items though the queries concerning properties of elements and their connections might have tens of elements. The database would be used by less than 10 users simultaneously at first though these things tend to expand quickly here if they work well.</p>
  <p>So, how would you implement this construct?</p>