Re: Postgresql database

From: "Little, Douglas" <DOUGLAS(dot)LITTLE(at)orbitz(dot)com>
To: Trinath Somanchi <trinath(dot)somanchi(at)gmail(dot)com>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Postgresql database
Date: 2010-05-14 13:20:55
Message-ID: 8585BA53443004458E0BAA6134C5A7FB0628F3F1@EGEXCMB01.oww.root.lcl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

To do a better job, I’d need to see the data dictionary – eg to understand what capacity means. Is it the capacity of a model? Ok, but what about contact info for a model? Is this really the contact info of the plant?
But this is what I’d do
[cid:image002(dot)png(at)01CAF33E(dot)5FD30FB0]

Mfg – designs a model
plant – builds/contact a plant for model manufacturing
vechicles are built in a plant according to the design of a model
models are of a model type (2,3,4 wheeled vehicles)

assuming that contact info is information about the mfg, I’d put the attributes there.

From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Trinath Somanchi
Sent: Friday, May 14, 2010 3:42 AM
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] Postgresql database

Hi All,

I have Tree structured database to maintain.

Its as follows.

Vehicles
|__> Two Wheelers
|__> Manufacturer
|__> Name of Manufacturer
|__> Year of make.
|__> Manuf. Plant.
|__> Model.
|__> Model Name
|__> Model Version
|__> Model Re-make Version.
|__> Year of Release
|__> Serial Number
|__> Capacity
| |__> Capacity Type
| |__> Capacity Version
|__> Contact Information
|__> Company Name
|__> Company Address
| |__> Street Address
| | |__> Lane 1
| | |__> Lane 2
| |__> City
| |__> Pin
|__> Contact Information
| |__> Phone
| |__> Fax
| |__> Email
|__> Website
|__> Three Wheelers
|__> Manufacturer
|__> Name of Manufacturer
|__> Year of make.
|__> Manuf. Plant.
|__> Model.
|__> Model Name
|__> Model Version
|__> Model Re-make Version.
|__> Year of Release
|__> Serial Number
|__> Capacity
| |__> Capacity Type
| |__> Capacity Version
|__> Contact Information
|__> Company Name
|__> Company Address
| |__> Street Address
| | |__> Lane 1
| | |__> Lane 2
| |__> City
| |__> Pin
|__> Contact Information
| |__> Phone
| |__> Fax
| |__> Email
|__> Website
|__> Four Wheelers
|__> Manufacturer
|__> Name of Manufacturer
|__> Year of make.
|__> Manuf. Plant.
|__> Model.
|__> Model Name
|__> Model Version
|__> Model Re-make Version.
|__> Year of Release
|__> Serial Number
|__> Capacity
| |__> Capacity Type
| |__> Capacity Version
|__> Contact Information
|__> Company Name
|__> Company Address
| |__> Street Address
| | |__> Lane 1
| | |__> Lane 2
| |__> City
| |__> Pin
|__> Contact Information
| |__> Phone
| |__> Fax
| |__> Email
|__> Website

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.

Thanks in advance.

--
Regards,
----------------------------------------------
Trinath Somanchi,

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Fenbers 2010-05-16 18:38:01 import ignoring duplicates
Previous Message silly sad 2010-05-14 10:23:19 Re: Postgresql database