On Thu, 13 Aug 2015 12:10:12 -0700, Alex Glaros wrote: > What would the data model look like for this?
Define an organizational unit. Give it a unique name. Give it a list of superiors and a list of subordinates. government = { 'president' : { 'superiors' : [], 'subordinates' : ['jcs', 'cia', 'fbi', 'nsa', 'treasury', 'nasa' ..... ] }, 'jcs' : { 'superiors': ['president', 'congress', 'senate', 'treasury'], 'subordinates' : ['army', 'navy', 'air force', 'jsoc'] }, 'navy' : { 'superiors' : ['jcs', 'nsa', 'cia'], 'subordinates' : ['seals', 'marines', 'pacific fleet' ....] }, ........ } The multiple parenting means that you need to use something as references. You can't represent the hierarchy as a simple tree, because in a simple tree a node only has one parent. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list