Re: Need advise for database structure for non linear data.

From: Stefan Keller <sfkeller(at)gmail(dot)com>
To: Fredric Fredricson <Fredric(dot)Fredricson(at)bonetmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Need advise for database structure for non linear data.
Date: 2011-01-03 21:35:18
Message-ID: AANLkTinbkmxDh0wVXMZ9vSJGdWMgM=hHacOLc4gAGyid@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andre,

From a distant view of your problem I would like to vote for Thomas
Kellerer's proposal:
Maintain only the data you need (to enhance import/sync performance)
and use the hstore data type (as long as query performance is ok).

Yours, S.

2011/1/3 Fredric Fredricson <Fredric(dot)Fredricson(at)bonetmail(dot)com>:
>
> On 01/03/2011 12:11 PM, Andre Lopes wrote:
>>
>> [snip]
>> The problem with this task is that the information is not linear, if I try
>> to design tables with fields for all possible data I will end up with many
>> row fields with NULL values. There are any problem with this(end up with
>> many row fields with NULL values)? Or should I user other kind of structure?
>> For example store the data in one field and that field containing an
>> associative array with data.
>
> As far as I understand NULL values are not really stored and a column with
> many NULLs is not a problem as such, but if it is part of an index the index
> might not be very useful.
>
> At least that's my understanding of how SQL databases work. If I got this
> wrong I hope someone will correct me.
>>
>> [snip]
>
> /Fredric
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kurt Westerfeld 2011-01-03 22:48:36 Date Parameter To Query Confusing Optimizer
Previous Message Fredric Fredricson 2011-01-03 21:00:50 Re: Need advise for database structure for non linear data.