Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95398
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: How to model government organization hierarchies so that the list can expand and compress |
| Date | 2015-08-15 22:51 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mqofp5$92g$1@dont-email.me> (permalink) |
| References | <b3c1e2da-9f72-420a-8b68-288dddf9fc67@googlegroups.com> |
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, denismfmcmahon@gmail.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to model government organization hierarchies so that the list can expand and compress Alex Glaros <alexglaros@gmail.com> - 2015-08-13 12:10 -0700
Re: How to model government organization hierarchies so that the list can expand and compress "Stéphane Wirtel" <stephane@wirtel.be> - 2015-08-13 21:17 +0200
Re: How to model government organization hierarchies so that the list can expand and compress Ian Kelly <ian.g.kelly@gmail.com> - 2015-08-13 13:26 -0600
Re: How to model government organization hierarchies so that the list can expand and compress Laura Creighton <lac@openend.se> - 2015-08-13 21:43 +0200
Re: How to model government organization hierarchies so that the list can expand and compress "Frank Millman" <frank@chagford.com> - 2015-08-14 08:36 +0200
Re: How to model government organization hierarchies so that the list can expand and compress Alex Glaros <alexglaros@gmail.com> - 2015-08-14 16:42 -0700
Re: How to model government organization hierarchies so that the list can expand and compress Rustom Mody <rustompmody@gmail.com> - 2015-08-14 18:21 -0700
Re: How to model government organization hierarchies so that the list can expand and compress Laura Creighton <lac@openend.se> - 2015-08-15 06:54 +0200
Re: How to model government organization hierarchies so that the list can expand and compress "Frank Millman" <frank@chagford.com> - 2015-08-15 07:59 +0200
Re: How to model government organization hierarchies so that the list can expand and compress Friedrich Rentsch <anthra.norell@bluewin.ch> - 2015-08-14 23:25 +0200
Re: How to model government organization hierarchies so that the list can expand and compress Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-08-14 19:38 -0400
Re: How to model government organization hierarchies so that the list can expand and compress Denis McMahon <denismfmcmahon@gmail.com> - 2015-08-15 22:51 +0000
Re: How to model government organization hierarchies so that the list can expand and compress Alex Glaros <alexglaros@gmail.com> - 2015-08-17 13:37 -0700
csiph-web