pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Colin Ross <colinross@gmail.com>
To: Michelle Konzack <linux4michelle@freenet.de>
Cc: pgsql-php@postgresql.org
Subject: Re: Application Design: Where to implement historical revisions of objects
Date: Fri, 25 May 2007 11:07:24 -0700
Message-ID: <fd3e08f30705251107s4843ec92p9d91a5d420aa20cb@mail.gmail.com> (raw)
In-Reply-To: <20070525174108.GA6097@freenet.de>
References: <fd3e08f30705231310m46901107gf7f44df6bd78a845@mail.gmail.com>
	<20070525174108.GA6097@freenet.de>

But in the one-table holds all system, the Model Object need to know about
it.
  i.e. "Select top 1 from data where serialnumber = 3821 order by revision
desc"
And off hand, it would make retrieving a whole data set of say- all the
current data involve a subquery to find the most recent data revision for
each serialnumber.

I don't at all mean to discount the system, but I have yet to find a good
pattern for dealing with multiple variants of the same datarow/set.

Colin

On 5/25/07, Michelle Konzack <linux4michelle@freenet.de> wrote:
>
> Hello Colin,
>
> Am 2007-05-23 13:10:42, schrieb Colin Ross:
> > In Practice:
> > An application has a model class of "PageContent" which represents the
> > content that is shown on a certain page. Users of the system are
> > authenticated, then able to edit the content. From an application design
> > point
> > of view, where should the logic and underlying system be for the
> management
> > of historical revisions.
>
> I have something similar, exactly, a Database of military data and data
> sets are never modified but added.
>
> So, I give each dataset a serialnumber and a revision 0. Then if the
> dataset was modified I change the revision to a higher number and add
> the whole dataset into a new row.
>
> This thing is done using trigers.
>
> Greetings
>     Michelle Konzack
>     Systemadministrator
>     Tamay Dogan Network
>     Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant #####################
> Michelle Konzack   Apt. 917                  ICQ #328449886
>                    50, rue de Soultz         MSN LinuxMichi
> 0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>
>

view thread (6+ messages)  latest in thread

Message-ID: <fd3e08f30705251107s4843ec92p9d91a5d420aa20cb@mail.gmail.com>
Permalink:  ../fd3e08f30705251107s4843ec92p9d91a5d420aa20cb@mail.gmail.com/
Also on:    postgresql.org/message-id/fd3e08f30705251107s4843ec92p9d91a5d420aa20cb@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: colinross@gmail.com, linux4michelle@freenet.de
  Subject: Re: Application Design: Where to implement historical revisions of objects
  In-Reply-To: <fd3e08f30705251107s4843ec92p9d91a5d420aa20cb@mail.gmail.com>
  References: <fd3e08f30705231310m46901107gf7f44df6bd78a845@mail.gmail.com> <20070525174108.GA6097@freenet.de> <fd3e08f30705251107s4843ec92p9d91a5d420aa20cb@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox