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


Groups > comp.lang.python > #95355

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

Path csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.059
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'hierarchical': 0.07; 'subject:How': 0.09; 'objects.': 0.09; 'example:': 0.10; 'subject: \n ': 0.15; 'thu,': 0.15; 'drag': 0.16; 'postgres,': 0.16; 'umbrella': 0.16; 'wrote:': 0.16; 'alex': 0.18; '2015': 0.20; 'aug': 0.20; 'header:In-Reply-To:1': 0.24; 'sort': 0.25; 'subject:list': 0.26; 'message-id:@mail.gmail.com': 0.27; '13,': 0.29; 'repair': 0.29; 'subject:that': 0.29; 'url:wikipedia': 0.29; "i'm": 0.30; 'url:wiki': 0.30; 'probably': 0.31; 'lets': 0.33; 'this?': 0.34; 'worked': 0.34; 'add': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'instead': 0.36; 'url:org': 0.36; 'smaller': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'list.': 0.37; 'anything': 0.38; 'someone': 0.38; 'data': 0.39; 'url:en': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'called': 0.40; 'collection': 0.60; 'within': 0.64; 'air': 0.65; 'records': 0.70; 'wish': 0.71; 'hoping': 0.77; 'folders.': 0.84; 'to:name:python': 0.84; 'inefficient': 0.91; 'imagine': 0.96
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=urp9OSZ90AJU84JBBvZFaulzkZ1p6lLoyKTChu4VVE4=; b=RHONWyjG+Y4YF0vZAa274jNKkZgtUYRulEwWSXYDh20gi8rd8yuT3u4o4nW9L4eIGU K2p7DepZ64019LG7SmZkmMvFPr4WbsyNpsEPcHvVrkba0I4ReJeLzAA8vgAj5IrY1pJ0 LTjX2hYQTwqlr9eOdu4JzdLrkSKY1MUAYpAIpbpa5VLWE5hBtoZr0h/Mle/KzszJ8cc+ HkQq9z0pBpRLHOFiqxgAZqb44PBXBaulx0X4XkEOhoZWCq8+cCqNXEggVbhwGG2nSgFm EsXE89jZP8AKDDguTT9AfN8pxtHBuxqbf25YDuPmhzySJm2J5KBEsZKy+EYhX089YP6v wm4w==
X-Received by 10.107.17.68 with SMTP id z65mr1115502ioi.97.1439494018443; Thu, 13 Aug 2015 12:26:58 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <b3c1e2da-9f72-420a-8b68-288dddf9fc67@googlegroups.com>
References <b3c1e2da-9f72-420a-8b68-288dddf9fc67@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Thu, 13 Aug 2015 13:26:19 -0600
Subject Re: How to model government organization hierarchies so that the list can expand and compress
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.175.1439494025.3627.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1439494025 news.xs4all.nl 2832 [2001:888:2000:d::a6]:52501
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:95355

Show key headers only | View raw


On Thu, Aug 13, 2015 at 1:10 PM, Alex Glaros <alexglaros@gmail.com> wrote:
> 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.

https://en.wikipedia.org/wiki/Tree_(data_structure)

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