Path: csiph.com!news.swapon.de!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'great.': 0.07; 'hierarchical': 0.07; 'cc:addr:python-list': 0.09; 'subject:How': 0.09; 'postgres': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'python.': 0.11; 'ignore': 0.14; '(say': 0.16; 'appreciated!': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'describing': 0.16; 'forth.': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'alex': 0.18; 'laura': 0.18; '2015': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'cc:2**1': 0.22; 'do.': 0.22; 'trying': 0.22; 'decide': 0.23; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'subject:list': 0.26; 'fri,': 0.27; '-0700,': 0.29; 'received:se': 0.29; 'subject:that': 0.29; 'cc:no real name:2**1': 0.29; "i'm": 0.30; 'run': 0.33; 'common': 0.33; 'equal': 0.34; 'structure': 0.34; 'could': 0.35; 'but': 0.36; 'child': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'charset :us-ascii': 0.37; 'data': 0.39; 'sure': 0.39; 'subject:the': 0.39; 'expressed': 0.39; 'where': 0.40; 'some': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.61; 'real': 0.62; 'course': 0.62; 'linked': 0.63; 'to,': 0.63; 'world': 0.64; 'places': 0.64; 'response.': 0.66; 'department.': 0.66; 'organisation': 0.66; 'design.': 0.72; '100%': 0.72; 'received:89': 0.80; 'deleted?': 0.84 To: Alex Glaros cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: How to model government organization hierarchies so that the list can expand and compress In-Reply-To: Message from Alex Glaros of "Fri, 14 Aug 2015 16:42:00 -0700." References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24968.1439614496.1@fido> Content-Transfer-Encoding: quoted-printable Date: Sat, 15 Aug 2015 06:54:56 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Sat, 15 Aug 2015 06:55:03 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1439614517 news.xs4all.nl 2966 [2001:888:2000:d::a6]:38605 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95386 In a message of Fri, 14 Aug 2015 16:42:00 -0700, Alex Glaros writes: >Frank, thanks for describing the terminology of what I'm trying to do. > >1. Do the recursive join Postgres examples you linked to, use a data stru= cture where the child has the adjoining parent-ID? Examples look great. > >2. Not 100% sure that hierarchical is the perfect solution but will go wi= th that now. Of course some agencies will be at equal levels; will ignore = for now. > >3. Could not find Laura's response. Was it deleted? > >4. Solution will expressed in the DB, not Python. > >Much appreciated! > >Alex What I said was, that real agencies are almost never perfectly heirarchical. That's an oversimplification. In the real world Organisation A (say Army) and Organisation B (say Navy) decide they have common interests and make a Joint Department. If you run that department you report to superiors in _both_ organisation A and organisation B, get orders from both places and so on and so forth. You must decide now what you want to do when you run into such departments, because that will greatly influence your design. Laura