Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 656AF633D21 for ; Fri, 14 May 2010 06:51:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 81600-01 for ; Fri, 14 May 2010 09:51:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail46.e.nsc.no (mail46.e.nsc.no [193.213.115.46]) by mail.postgresql.org (Postfix) with ESMTP id 03FB2633D12 for ; Fri, 14 May 2010 06:51:07 -0300 (ADT) Received: from balapapa.localnet (42.185.16.62.customer.cdi.no [62.16.185.42]) (authenticated bits=0) by mail46.nsc.no (8.14.3/8.14.3) with ESMTP id o4E9p3iE019520 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 14 May 2010 11:51:05 +0200 (MEST) From: Leif Biberg Kristensen To: pgsql-sql@postgresql.org Subject: Re: Postgresql database Date: Fri, 14 May 2010 11:51:02 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.32-gentoo-r7; KDE/4.3.5; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005141151.02716.leif@solumslekt.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201005/69 X-Sequence-Number: 34117 On Friday 14. May 2010 10.42.17 Trinath Somanchi wrote: > Hi All, [snipped] > This way the data in the table is tree structured. Also A single > manufacturer has all mode of vehicles. I'm in my way to design this DB for > use in PgSQL. But for a vast data, data retrieval is a very costly task > (Joining all tables). > > Can any one guide me of this design, on how the structure looks like. Hard > about Inheritance feature of pgSQL. But not aware of how implementation > goes. You should think about a more normalized structure. Think about a table of "manufacturers", and a table of "models", the latter with a foreign key referencing the id of the former. The number of wheels is obviously an attribute of "models". regards, -- Leif Biberg Kristensen http://solumslekt.org/blog/