Hi all,

I have a little rdbms question:

Let's say I am creating a simple CMS and I want to be able to keep the
history of changes (versioning).

A typical record in the main content table would have things like id,
title, body text and timestamp, the latter would be when it was saved,
and getting the latest record would be the "current" version.

For one page to get the "current" version, this is simple to query to
just get the latest record, but it it will be a little more complicated
to do aggregated functions (i.e. get the latest records of all pages).

To make this smoother, there are a number of ways to do this:
* Have a lookup-table of the latest records (maintained by triggers or
in the app, on insert)
* Have the above in a persistance layer in the application (i.e. an
array in app scope)
* keep the "history" (old versions) in a separate table (maintained by
triggers?)
* super-complicated: create a parent-child relation between each
record...

Any comments/inputs? I am especially curious what Jochem says about
this...

--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to