Re: Flattening a kind of 'dynamic' table

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Flattening a kind of 'dynamic' table
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A75F4@Herge.rcsinc.local
обсуждение исходный текст
Ответ на Flattening a kind of 'dynamic' table  (Alexandre Leclerc <alexandre.leclerc@gmail.com>)
Ответы Re: Flattening a kind of 'dynamic' table  (Alexandre Leclerc <alexandre.leclerc@gmail.com>)
Список pgsql-performance
Alexandre wrote:
> > >
> > Right.  I expanding departments into columns is basically a dead
end.
> > First of all, SQL is not really designed to do this, and second of
all
> > (comments continued below)
>
> Ok, I got it. The basic message is to avoid making columns out of rows

yes.  This is wrong.

> like I'm doing right now, that "de-normalizing" in an array is the way
> to go.

Only sometimes.  Looping application code is another tactic.  There may
be other things to do as well that don't involve arrays or application
code.  Consider arrays a (very postgresql specific) tool in your
expanding toolchest.

De-normalization is a loaded term because we are only presenting queried
data in an alternate format (normalization normally applying to data
structured within the database).  There are many people on this list who
will tell you not to de-normalize anything, ever (and most of the time,
you shouldn't!).

Merlin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Alexandre Leclerc
Дата:
Сообщение: Re: Flattening a kind of 'dynamic' table
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Swapping on Solaris