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

Array columns vs normalized table

From: Lee Hachadoorian <lee(dot)hachadoorian(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Array columns vs normalized table
Date: 2010-03-02 17:21:24
Message-ID: 5ab13581003020921q3b5dd481mf118fa05f555fd7b@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
I work with state labor data which is reported to us in the form

	industry, year, quarter1, quarter2, quarter3, quarter4

where each quarter represents an employment count. Obviously, this can
be normalized to

	industry, year, quarter, employment

Can anyone comment on, or point to me to an article or discussion
regarding, why one would use an array column instead of normalizing
the data? That is, would there be any benefit to storing it as

	industry int, year smallint, employment int[ ]

where the last column would be a four element array with data for the
four quarters.

Thanks,
--Lee

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

Responses

pgsql-general by date

Next:From: Vick KheraDate: 2010-03-02 17:48:07
Subject: disable triggers isolated to transaction only?
Previous:From: Scott BaileyDate: 2010-03-02 17:10:40
Subject: Re: to_timestamp() and quarters

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