Re: EAV or not to EAV?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: EAV or not to EAV?
Date: 2007-11-22 10:57:34
Message-ID: Pine.LNX.4.64.0711221356470.17908@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Thu, 22 Nov 2007, Reg Me Please wrote:

> Hi all.
>
> I have to take into account the update history of every single
> field into a number of tables.
> Those updates can come to the future (next values) but also to the
> past (history fix) and apply only to some fields, usually not to the
> entire record.
> Every lookup in those tables is always related to a timestamp that
> normally is the current timestamp, but can also be a past timestamp.
>
> I've come up with a "traditionally regretted" EAV design with the add of
> timestamps for the history. And the related problems, some of which have
> been solved by Joe Conways's crosstab contrib.
>
> Is there a better idea than mine? I hope so.

We use contrib/hstore for this

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sorin N. Ciolofan 2007-11-22 13:19:06 backup of postgres scheduled with cron
Previous Message Reg Me Please 2007-11-22 08:48:35 EAV or not to EAV?

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-11-22 12:48:37 Re: Postgres table size
Previous Message Harald Fuchs 2007-11-22 10:13:32 Re: Restart a sequence regularly