Re: variant column type - Mailing list pgsql-general

From salah jubeh
Subject Re: variant column type
Date
Msg-id 1311760170.49000.YahooMailRC@web161503.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: variant column type  (Radosław Smogura <rsmogura@softperience.eu>)
List 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


pgsql-general by date:

Previous
From: Toby Corkindale
Date:
Subject: repmgr problem with registering standby
Next
From: Simon Riggs
Date:
Subject: Re: repmgr problem with registering standby