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.png@01CAF33E.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-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Trinath Somanchi Sent: Friday, May 14, 2010 3:42 AM To: pgsql-sql@postgresql.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,
<<inline: image002.png>>