Skip site navigation (1) Skip section navigation (2)

Re: Flattening a kind of 'dynamic' table

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Alexandre Leclerc" <alexandre(dot)leclerc(at)gmail(dot)com>
Cc: "PERFORM" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Flattening a kind of 'dynamic' table
Date: 2005-01-27 21:05:09
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3412A75F4@Herge.rcsinc.local (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Alexandre wrote:
> > >
> > Right.  I expanding departments into columns is basically a dead
> > First of all, SQL is not really designed to do this, and second of
> > (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!).  



pgsql-performance by date

Next:From: Andrew SullivanDate: 2005-01-27 21:36:59
Subject: Re: Swapping on Solaris
Previous:From: Alexandre LeclercDate: 2005-01-27 20:02:48
Subject: Re: Flattening a kind of 'dynamic' table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group