Re: Application Design: Where to implement historical revisions of objects
Chris <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.php |
|---|---|
| Message-ID | <[email protected]> |
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/ ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings