Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Yeb Havinga
Achilleas Mantzios wrote: Στις Wednesday 07 April 2010 11:06:44 ο/η Yeb Havinga έγραψε: Achilleas Mantzios wrote: You could also consider the genealogical approach, e.g. The parents of any node to the root, i.e. the path of any node to the root are depicted as parents[0] : immediate

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Lee Hachadoorian
On Tue, Apr 6, 2010 at 2:34 PM, Little, Douglas wrote: > Hey Lee, > > I’m on dm-disc...@yahoogroups.com Thanks for the pointer. I'm looking at their archives now. > Ie a row is a point in time, or average for a period of time. Are the > Numbers actual, or estimates?To be useful, you’ll want

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Achilleas Mantzios
Στις Wednesday 07 April 2010 11:06:44 ο/η Yeb Havinga έγραψε: > Achilleas Mantzios wrote: > > You could also consider the genealogical approach, e.g. > > > > > > The parents of any node to the root, i.e. the path of any node to the root > > are depicted as > > parents[0] : immediate parent > > par

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Achilleas Mantzios
Στις Wednesday 07 April 2010 11:26:29 ο/η Sergey Konoplev έγραψε: > On 6 April 2010 21:33, Lee Hachadoorian wrote: > > More generally, what questions should I be asking to help decide what > > structure makes the most sense? Are there any websites, forums, or books > > that cover this kind of prob

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Achilleas Mantzios
Στις Wednesday 07 April 2010 10:53:00 ο/η silly sad έγραψε: > On 04/07/10 11:00, Achilleas Mantzios wrote: > > > Column | Type| Modifiers > > -+---+--- > > id | i

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Sergey Konoplev
On 6 April 2010 21:33, Lee Hachadoorian wrote: > More generally, what questions should I be asking to help decide what > structure makes the most sense? Are there any websites, forums, or books > that cover this kind of problem? Haven't you thought about ltree contrib? From the description of ltr

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Yeb Havinga
Achilleas Mantzios wrote: You could also consider the genealogical approach, e.g. The parents of any node to the root, i.e. the path of any node to the root are depicted as parents[0] : immediate parent parents[1] : immediate parent of the above parent What I have more than one parent? re

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread silly sad
On 04/07/10 11:00, Achilleas Mantzios wrote: Column | Type| Modifiers -+---+--- id | integer | not null default nextval(('public.paintgentypes_id_seq'::text)

Re: [SQL] Table Design for Hierarchical Data

2010-04-07 Thread Achilleas Mantzios
You could also consider the genealogical approach, e.g. postg...@dynacom=# \d paintgentypes Table "public.paintgentypes" Column | Type| Modifiers -+---+---