SPUG: Stupid Ascii question
Peter Darley
pdarley at kinesis-cem.com
Thu Aug 15 13:07:04 CDT 2002
Jerome,
I thought I might get this question. The reasons are:
I don't want deleted stuff in the real table, growing indexes and
potentially slowing down queries etc.
If the deleted stuff stays in the original table there is a good chance
that there will be collisions with primary keys or other unique constraints
if something similar is added back in in the future.
I want to be able to put all deleted stuff into one table, rather
than having one 'deleted' table for each real table I have. If I can pack
everything into a string the table doesn't need to match because all the
data goes into one field.
Thanks,
Peter Darley
-----Original Message-----
From: O'neil, Jerome [mailto:joneil at cobaltgroup.com]
Sent: Thursday, August 15, 2002 10:55 AM
To: Peter Darley; SPUG
Subject: RE: SPUG: Stupid Ascii question
> Peter Darley <pdarley at kinesis-cem.com> wrote:
> Friends, I am working with database stuff and I
> want to store deleted database records, so
> there's a history of what was in the database.
I know I'll be declared a heretic for recommending it, but if you have
access to the database, why not simply let the database handle it instead of
writing a bunch of code and custom formats.
Add a boolean 'deleted' attribute to the relations in question, or create a
new 'deleted records' relation, and add a trigger to copy the record on
delete. Standard OLAP stuff.
This way you have a complete history in the database, everything is fully
recoverable via your SOP database management practices, and you've saved a
bunch of time.
$0.02 worth. Spend wisely...
-Jerome
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list