Re: Application Design: Where to implement historical revisions of objects

Поиск
Список
Период
Сортировка
От Chris
Тема Re: Application Design: Where to implement historical revisions of objects
Дата
Msg-id 4654DD7C.3000103@gmail.com
обсуждение исходный текст
Ответ на Application Design: Where to implement historical revisions of objects  ("Colin Ross" <colinross@gmail.com>)
Список pgsql-php
Colin Ross wrote:
> Summary:
> In a situation where the business model dictates that a certain entity
> or class of entities should support the viewing of and differencing of
> historical revisions of the data (read properties) contained in the
> entity should be supported. Should the logic for the creation and
> viewing of this historical information be implemented in the application
> itself

If you are only going to be using postgres, do it with a trigger so you
don't have to remember to do it in the application (it's quite easy to
forget something like this).

If you have to support other databases as well, then make sure they
support triggers.

If you have to use a database that doesn't support triggers, then that
makes the decision for you (eg supporting mysql 4.1).

If you have to do it in the app, it's still quite easy:

insert into history_table (...) select x,y,z from orig_table where id='X'

Done :)

--
Postgresql & php tutorials
http://www.designmagick.com/

В списке pgsql-php по дате отправления:

Предыдущее
От: "Colin Ross"
Дата:
Сообщение: Application Design: Where to implement historical revisions of objects
Следующее
От: Michelle Konzack
Дата:
Сообщение: Re: Application Design: Where to implement historical revisions of objects