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

Re: Array columns vs normalized table

From: Lee Hachadoorian <lee(dot)hachadoorian(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Array columns vs normalized table
Date: 2010-03-02 18:42:34
Message-ID: 5ab13581003021042k27104a5t3250985c8f527c2b@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Pavel, the idea of using arrays to store long time-series data sounds
good, but I take your point that normalized tables might be better and
are easier to query. I suppose the choice will be between normalizing
or using the denormalized

industry int,
year    smallint,
emp_q1  int,
emp_q2  int,
emp_q3  int,
emp_q4  int

as suggested by Peter and Scott. We're mostly actually interested in
annual numbers, but need to preserve the quarterly data for
verification and for unusual analyses. So perhaps storing denormalized
with an additional emp_annual int field, and a view that keeps the
quarterly data out of sight.

Thanks for your replies. Please feel free to comment if you think of
anything else.

Best,
--Lee

--
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center

In response to

pgsql-general by date

Next:From: Ben ChobotDate: 2010-03-02 18:47:05
Subject: Re: disable triggers isolated to transaction only?
Previous:From: Ben EliottDate: 2010-03-02 18:22:17
Subject: createdb but revoke dropdb

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