Skip site navigation (1) Skip section navigation (2)

Re: Table-design for categories, suggestions needed

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Rikard Bosnjakovic <rikard(dot)bosnjakovic(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Table-design for categories, suggestions needed
Date: 2010-08-05 14:38:32
Message-ID: AANLkTinn-BmGd9vJxvFs_dWRqu5jfBEXnjkOj0Y07hhF@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, Aug 4, 2010 at 6:32 PM, Rikard Bosnjakovic
<rikard(dot)bosnjakovic(at)gmail(dot)com> wrote:

> A more readable output:
>
> # select id, name, subcategory_1, subcategory_2 from categories where id > 3;
>  id | name  | subcategory_1 | subcategory_2
> ----+-------+---------------+---------------
>  4 | IC    |               |
>  6 | Logic |             4 |
>  10 | CMOS  |               |             6
>  11 | TTL   |               |             6

Are you trying to model entity inheritance with this design?
-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

In response to

Responses

pgsql-novice by date

Next:From: Jaime CasanovaDate: 2010-08-05 16:16:22
Subject: Re: Looking for SKYLINE command
Previous:From: Rikard BosnjakovicDate: 2010-08-05 01:32:30
Subject: Re: Table-design for categories, suggestions needed

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group