pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgresql database
6+ messages / 4 participants
[nested] [flat]
* Postgresql database
@ 2010-05-14 08:42 Trinath Somanchi <trinath.somanchi@gmail.com>
2010-05-14 09:14 ` Re: Postgresql database silly sad <sad@bankir.ru>
2010-05-14 09:51 ` Re: Postgresql database Leif Biberg Kristensen <leif@solumslekt.org>
2010-05-14 13:20 ` Re: Postgresql database Little, Douglas <DOUGLAS.LITTLE@orbitz.com>
0 siblings, 3 replies; 6+ messages in thread
From: Trinath Somanchi @ 2010-05-14 08:42 UTC (permalink / raw)
To: pgsql-sql
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,
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Postgresql database
2010-05-14 08:42 Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
@ 2010-05-14 09:14 ` silly sad <sad@bankir.ru>
2010-05-14 09:28 ` Re: Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
2 siblings, 1 reply; 6+ messages in thread
From: silly sad @ 2010-05-14 09:14 UTC (permalink / raw)
To: pgsql-sql
On 05/14/10 12:42, Trinath Somanchi wrote:
> Hi All,
>
> I have Tree structured database to maintain.
>
> Its as follows.
>
> Vehicles
u r talking about a single entity vehicles
it is very common to represent a single entity with a single table
and IF u also have to have an entity "class of vehicles"
u r free to declare the second table named "class"
and IF u also have to represent a reference of manfacturers, another one
table u have to create then.
that's trivial case
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Postgresql database
2010-05-14 08:42 Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
2010-05-14 09:14 ` Re: Postgresql database silly sad <sad@bankir.ru>
@ 2010-05-14 09:28 ` Trinath Somanchi <trinath.somanchi@gmail.com>
2010-05-14 10:23 ` Re: Postgresql database silly sad <sad@bankir.ru>
0 siblings, 1 reply; 6+ messages in thread
From: Trinath Somanchi @ 2010-05-14 09:28 UTC (permalink / raw)
To: pgsql-sql
yes... But attribute of this table asl has an instance .. that two year of
releases are possible
also... I'm speaking of a very trivial case.
On Fri, May 14, 2010 at 2:44 PM, silly sad <sad@bankir.ru> wrote:
> On 05/14/10 12:42, Trinath Somanchi wrote:
>
>> Hi All,
>>
>> I have Tree structured database to maintain.
>>
>> Its as follows.
>>
>> Vehicles
>>
>
> u r talking about a single entity vehicles
> it is very common to represent a single entity with a single table
>
> and IF u also have to have an entity "class of vehicles"
> u r free to declare the second table named "class"
>
> and IF u also have to represent a reference of manfacturers, another one
> table u have to create then.
>
> that's trivial case
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
--
Regards,
----------------------------------------------
Trinath Somanchi,
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Postgresql database
2010-05-14 08:42 Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
2010-05-14 09:14 ` Re: Postgresql database silly sad <sad@bankir.ru>
2010-05-14 09:28 ` Re: Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
@ 2010-05-14 10:23 ` silly sad <sad@bankir.ru>
0 siblings, 0 replies; 6+ messages in thread
From: silly sad @ 2010-05-14 10:23 UTC (permalink / raw)
To: pgsql-sql
On 05/14/10 13:28, Trinath Somanchi wrote:
> yes... But attribute of this table asl has an instance .. that two year
> of releases are possible
> also... I'm speaking of a very trivial case.
it doesnt multiplies the multitude of table.
it makes no problems with the "joins of ALL the tables"
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Postgresql database
2010-05-14 08:42 Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
@ 2010-05-14 09:51 ` Leif Biberg Kristensen <leif@solumslekt.org>
2 siblings, 0 replies; 6+ messages in thread
From: Leif Biberg Kristensen @ 2010-05-14 09:51 UTC (permalink / raw)
To: pgsql-sql
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/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Postgresql database
2010-05-14 08:42 Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
@ 2010-05-14 13:20 ` Little, Douglas <DOUGLAS.LITTLE@orbitz.com>
2 siblings, 0 replies; 6+ messages in thread
From: Little, Douglas @ 2010-05-14 13:20 UTC (permalink / raw)
To: Trinath Somanchi <trinath.somanchi@gmail.com>; 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.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-owner@postgresql.org [mailto:pgsql-sql-owner@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,
Attachments:
image002.png (image/png, 1.1K) download
view image
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2010-05-14 13:20 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-05-14 08:42 Postgresql database Trinath Somanchi <trinath.somanchi@gmail.com>
2010-05-14 09:14 ` silly sad <sad@bankir.ru>
2010-05-14 09:28 ` Trinath Somanchi <trinath.somanchi@gmail.com>
2010-05-14 10:23 ` silly sad <sad@bankir.ru>
2010-05-14 09:51 ` Leif Biberg Kristensen <leif@solumslekt.org>
2010-05-14 13:20 ` Little, Douglas <DOUGLAS.LITTLE@orbitz.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox