Re: variant column type

From: salah jubeh <s_jubeh(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: variant column type
Date: 2011-07-27 09:49:30
Message-ID: 1311760170.49000.YahooMailRC@web161503.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the help, and for different design options it really helped me. I had
a look on vertical design and horizontal design and this is some cons and pros
in general for vertical design

Advantages:
• Avoid null values and utilize storage
• Avoid constant schema changes due to adding columns
• Avoid performance issues which may encountered when a the table is very
wide for specific queries
Disadvantages
• Queries written against the vertical design became cumbersome.
• Multiple joins to pull back each attribute.
• Data needs to be converted to the horizontal design in many cases so you
need the contribution modules such as table funcs

• Data domains are problematic and hacks here can be used such as fix your
attributes, or using many tables....

------------------------

the car speed is 240
the car has an airbag

Here the first value is integer and the second value is boolean. Consider that I
have this table structure

feature (feature id feature name)
car (car id, .... )
car_feature (car id, feature id, value). the value attribute might have
different domains. How can I model this using postgres and using ANSI compliant
design ?

Regards

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2011-07-27 09:49:40 Re: repmgr problem with registering standby
Previous Message Toby Corkindale 2011-07-27 09:36:19 repmgr problem with registering standby