Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #95382

Re: How to model government organization hierarchies so that the list can expand and compress

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: How to model government organization hierarchies so that the list can expand and compress
Date 2015-08-14 19:38 -0400
Organization IISS Elusive Unicorn
References <b3c1e2da-9f72-420a-8b68-288dddf9fc67@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.14.1439595502.4764.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, 13 Aug 2015 12:10:12 -0700 (PDT), Alex Glaros
<alexglaros@gmail.com> declaimed the following:

>It's like the desktop folder/directory model where you can create unlimited folders and put folders within other folders. Instead of folders, I want to use government organizations. 
>
>Example: Let user create agency names: Air Force, Marines, Navy, Army. Then let them create an umbrella collection called "Pentagon", and let users drag Air Force, Marines, Navy, etc. into the umbrella collection. 
>
>User may wish to add smaller sub-sets of Army, such as "Army Jeep Repair Services" 
>
>User may also want to add a new collection "Office of the President" and put OMB and Pentagon under that as equals. 
>
>What would the data model look like for this?  If I have a field: next_higher_level_parent that lets children records keep track of parent record, it's hard for me to imagine anything but an inefficient bubble sort to produce a hierarchical organizational list. Am using Postgres, not graph database.
>
>I'm hoping someone else has worked on this problem, probably not with government agency names, but perhaps the same principle with other objects. 
>

	Practically any Genealogy program (though the best two, IMNSHO, have
both been discontinued -- Ultimate Family Tree and The Master Genealogist;
both were "event based" rather than the common "family based" types
[families in UFT/TMG result from the event of a birth event, whereas others
present a form that is based upon two parents automatically]).

	I keep joking that I'm going to put the life of Standard Oil into TMG
(the split up would be lots of children "born" at the same time the parent
company "died"; mergers would be "marriages" with/without a change of name
event and death of one of the marriage partners).

	If you are using a database, why do you envision a bubble sort in
use... select the top-level entities -- sorted by the database engine. Loop
over the result set, for each entity perform a select of the children of
that entity, again sorted by the DBMS. Perform this recursively until no
more grandchildren are found...


>Thanks! 
>
>Alex Glaros
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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